| Total Complexity | 6 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | #!/usr/bin/env python |
||
| 9 | class NoiseTests(unittest.TestCase): |
||
| 10 | |||
| 11 | def test_noise(self): |
||
| 12 | n = tdl.noise.Noise() |
||
| 13 | self.assertIsInstance(n.get_point(0, 0), float) |
||
| 14 | n = tdl.noise.Noise('Wavelet', 'FBM') |
||
| 15 | self.assertIsInstance(n.get_point(0, 0), float) |
||
| 16 | |||
| 17 | def test_noise_exceptions(self): |
||
| 18 | with self.assertRaises(tdl.TDLError): |
||
| 19 | tdl.noise.Noise(algorithm='') |
||
| 20 | with self.assertRaises(tdl.TDLError): |
||
| 21 | tdl.noise.Noise(mode='') |
||
| 22 | |||
| 23 | def test_noise_copy(self): |
||
| 24 | self.assertIsInstance(copy.copy(tdl.noise.Noise()), tdl.noise.Noise) |
||
| 25 | |||
| 26 | def test_noise_pickle(self): |
||
| 27 | self.assertIsInstance(pickle.loads(pickle.dumps(tdl.noise.Noise())), |
||
| 28 | tdl.noise.Noise) |
||
| 29 | |||
| 31 |