Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d6402a40
Commit
d6402a40
authored
Jul 08, 2016
by
Steven D'Aprano
Browse files
Options
Browse Files
Download
Plain Diff
Automated merge with
ssh://hg.python.org/cpython
parents
4afd143d
8c115a46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Lib/test/test_statistics.py
Lib/test/test_statistics.py
+16
-0
No files found.
Lib/test/test_statistics.py
View file @
d6402a40
...
...
@@ -1600,6 +1600,22 @@ class TestMedianGrouped(TestMedian):
data
=
[
220
,
220
,
240
,
260
,
260
,
260
,
260
,
280
,
280
,
300
,
320
,
340
]
self
.
assertEqual
(
self
.
func
(
data
,
20
),
265.0
)
def
test_data_type_error
(
self
):
# Test median_grouped with str, bytes data types for data and interval
data
=
[
""
,
""
,
""
]
self
.
assertRaises
(
TypeError
,
self
.
func
,
data
)
#---
data
=
[
b""
,
b""
,
b""
]
self
.
assertRaises
(
TypeError
,
self
.
func
,
data
)
#---
data
=
[
1
,
2
,
3
]
interval
=
""
self
.
assertRaises
(
TypeError
,
self
.
func
,
data
,
interval
)
#---
data
=
[
1
,
2
,
3
]
interval
=
b""
self
.
assertRaises
(
TypeError
,
self
.
func
,
data
,
interval
)
class
TestMode
(
NumericTestCase
,
AverageMixin
,
UnivariateTypeMixin
):
# Test cases for the discrete version of mode.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment