(self)
| 1018 | self.assertRaises(statistics.StatisticsError, next, it) |
| 1019 | |
| 1020 | def test_error_msg(self): |
| 1021 | # Test that a given error message is used. |
| 1022 | msg = "badness #%d" % random.randint(10000, 99999) |
| 1023 | try: |
| 1024 | next(statistics._fail_neg([-1], msg)) |
| 1025 | except statistics.StatisticsError as e: |
| 1026 | errmsg = e.args[0] |
| 1027 | else: |
| 1028 | self.fail("expected exception, but it didn't happen") |
| 1029 | self.assertEqual(errmsg, msg) |
| 1030 | |
| 1031 | |
| 1032 | # === Tests for public functions === |
nothing calls this directly
no test coverage detected