diff -r eaee5aed6fbc Lib/test/test_statistics.py --- a/Lib/test/test_statistics.py Thu May 26 12:19:42 2016 -0700 +++ b/Lib/test/test_statistics.py Fri May 27 13:21:25 2016 -0400 @@ -1600,6 +1600,24 @@ data = [220, 220, 240, 260, 260, 260, 260, 280, 280, 300, 320, 340] self.assertEqual(self.func(data, 20), 265.0) + def test_data_str_failure(self): + data = ["", "", ""] + self.assertRaises(TypeError, self.func, data) + + def test_data_bytes_failure(self): + data = [b"", b"", b""] + self.assertRaises(TypeError, self.func, data) + + def test_interval_str_failure(self): + data = [1, 2, 3] + interval = "" + self.assertRaises(TypeError, self.func, data, interval) + + def test_interval_bytes_failure(self): + 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.