Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -15,20 +15,12 @@ class aubio_window(TestCase): · 14 unmodified lines | |||
| 15 | window("default", 1024) | 15 | window("default", 1024) |
| 16 | 16 | ||
| 17 | def test_fail_name_not_string(self): | 17 | def test_fail_name_not_string(self): |
| 18 | try: | 18 | with self.assertRaises(TypeError): |
| 19 | window(10, 1024) | 19 | window(10, 1024) |
| 20 | except ValueError as e: | ||
| 21 | pass | ||
| 22 | else: | ||
| 23 | self.fail('non-string window type does not raise a ValueError') | ||
| 24 | 20 | ||
| 25 | def test_fail_size_not_int(self): | 21 | def test_fail_size_not_int(self): |
| 26 | try: | 22 | with self.assertRaises(TypeError): |
| 27 | window("default", "default") | 23 | window("default", "default") |
| 28 | except ValueError as e: | ||
| 29 | pass | ||
| 30 | else: | ||
| 31 | self.fail('non-integer window length does not raise a ValueError') | ||
| 32 | 24 | ||
| 33 | def test_compute_hanning_1024(self): | 25 | def test_compute_hanning_1024(self): |
| 34 | size = 1024 | 26 | size = 1024 |