Adopted test result for gain function.

Now: return -inf if the magnitude of Z is 0
pull/160/head
Holger Mueller 2020-02-10 19:51:42 +01:00
rodzic 707bd792c7
commit 6bb37a2476
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -122,7 +122,7 @@ class TestRFToolsDatapoint(unittest.TestCase):
def test_properties(self):
self.assertEqual(self.dp.z, complex(0.1091, 0.3118))
self.assertAlmostEqual(self.dp.phase, 1.23420722)
self.assertEqual(self.dp0.gain, 0.0)
self.assertEqual(self.dp0.gain, -math.inf)
self.assertAlmostEqual(self.dp.gain, -9.6208748)
self.assertEqual(self.dp50.vswr, 1.0)
self.assertAlmostEqual(self.dp.vswr, 1.9865736)