From 73f09eabe9e92eafaf54d648fc246b5ecd0d1267 Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Wed, 8 Apr 2020 17:30:25 +0200 Subject: [PATCH] Code clean up --- tests/test_FileTarget.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_FileTarget.py b/tests/test_FileTarget.py index 3ae8dcd..9c7fb5b 100644 --- a/tests/test_FileTarget.py +++ b/tests/test_FileTarget.py @@ -9,13 +9,12 @@ class TestFileTarget(TestCase): def setUp(self): self.target = FileTarget("data/target/target_demo_1.csv") - -class TestInit(TestFileTarget): def test_signal(self): - signal = SpectralQty(np.arange(200, 210, 1) * u.nm, + signal = SpectralQty(np.arange(200, 210, 1) << u.nm, np.arange(1.1e-15, 2.0e-15, 1e-16) << u.W / (u.m ** 2 * u.nm)) self.assertTrue(self.target.calcSignal().__eq__(signal)) def test_noise(self): - noise = SpectralQty(list(range(200, 210, 1)) * u.nm, [0] * 10 << u.W / (u.m ** 2 * u.nm * u.sr)) + noise = SpectralQty(np.arange(200, 210, 1) << u.nm, + [0.] * 10 << u.W / (u.m ** 2 * u.nm * u.sr)) self.assertEqual(self.target.calcNoise(), noise)