From 9d6dabdd9eb28f75988e9f8bb98ef6f65ef7d995 Mon Sep 17 00:00:00 2001 From: Javi Merino Date: Thu, 14 Aug 2014 15:32:36 +0100 Subject: tests: make them get the trace classes from explicitly from Run() invocations Trace classes are about to be removed from the directly exposed module classes so don't make tests rely on it. Move a couple of checks from ThermalGovernor tests to the Run() tests as it's testing basic functionality that really belongs to the Run() class now. --- tests/test_pid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test_pid.py') diff --git a/tests/test_pid.py b/tests/test_pid.py index 8796f22..ce66d08 100644 --- a/tests/test_pid.py +++ b/tests/test_pid.py @@ -3,12 +3,12 @@ import matplotlib from test_thermal import BaseTestThermal -from cr2 import PIDController +import cr2 class TestPIDController(BaseTestThermal): def test_dataframe(self): """Test that PIDController() generates a valid data_frame""" - pid = PIDController() + pid = cr2.Run().pid_controller self.assertTrue(len(pid.data_frame) > 0) self.assertTrue("err_integral" in pid.data_frame.columns) @@ -18,7 +18,7 @@ class TestPIDController(BaseTestThermal): """Test PIDController.plot_controller() As it happens with all plot functions, just test that it doesn't explode""" - pid = PIDController() + pid = cr2.Run().pid_controller pid.plot_controller() matplotlib.pyplot.close('all') -- cgit v1.2.3