Loading Common/Interfaces/MinorServoInterface/test/functional/test_getAxesPosition.py +11 −6 Original line number Diff line number Diff line Loading @@ -20,15 +20,20 @@ __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestGetAxesPosition(unittest2.TestCase): telescope = os.getenv('TARGETSYS') @classmethod def setUpClass(cls): cls.client = PySimpleClient() cls.boss = cls.client.getComponent('MINORSERVO/Boss') @classmethod def tearDownClass(cls): cls.client.releaseComponent('MINORSERVO/Boss') def setUp(self): self.telescope = os.getenv('TARGETSYS') self.client = PySimpleClient() self.boss = self.client.getComponent('MINORSERVO/Boss') self.setup_code = "CCB" if self.telescope == "SRT" else "CCC" def tearDown(self): self.client.releaseComponent('MINORSERVO/Boss') def test_not_ready(self): """Raise a MinorServoErrorsEx in case the system is not ready""" with self.assertRaises(MinorServoErrorsEx): Loading Common/Interfaces/MinorServoInterface/test/functional/test_scan.py +6 −5 Original line number Diff line number Diff line Loading @@ -52,7 +52,12 @@ class ScanBaseTest(unittest2.TestCase): def tearDown(self): if self.boss.isScanActive(): self.boss.closeScan() t = self.boss.closeScan() self.waitUntil(t) def waitUntil(self, targetTime): while getTimeStamp().value < targetTime: time.sleep(0.1) class ScanTest(ScanBaseTest): Loading Loading @@ -239,10 +244,6 @@ class ScanTest(ScanBaseTest): self.assertFalse(self.boss.isScanning()) self.assertAlmostEqual(startPos + self.scan.range, endPos, delta=0.1) def waitUntil(self, targetTime): while getTimeStamp().value < targetTime: time.sleep(0.1) def getSRTPosition(self, conf_code, servo_name, elevation=45): """Return the servo position related to the elevation. Loading Loading
Common/Interfaces/MinorServoInterface/test/functional/test_getAxesPosition.py +11 −6 Original line number Diff line number Diff line Loading @@ -20,15 +20,20 @@ __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestGetAxesPosition(unittest2.TestCase): telescope = os.getenv('TARGETSYS') @classmethod def setUpClass(cls): cls.client = PySimpleClient() cls.boss = cls.client.getComponent('MINORSERVO/Boss') @classmethod def tearDownClass(cls): cls.client.releaseComponent('MINORSERVO/Boss') def setUp(self): self.telescope = os.getenv('TARGETSYS') self.client = PySimpleClient() self.boss = self.client.getComponent('MINORSERVO/Boss') self.setup_code = "CCB" if self.telescope == "SRT" else "CCC" def tearDown(self): self.client.releaseComponent('MINORSERVO/Boss') def test_not_ready(self): """Raise a MinorServoErrorsEx in case the system is not ready""" with self.assertRaises(MinorServoErrorsEx): Loading
Common/Interfaces/MinorServoInterface/test/functional/test_scan.py +6 −5 Original line number Diff line number Diff line Loading @@ -52,7 +52,12 @@ class ScanBaseTest(unittest2.TestCase): def tearDown(self): if self.boss.isScanActive(): self.boss.closeScan() t = self.boss.closeScan() self.waitUntil(t) def waitUntil(self, targetTime): while getTimeStamp().value < targetTime: time.sleep(0.1) class ScanTest(ScanBaseTest): Loading Loading @@ -239,10 +244,6 @@ class ScanTest(ScanBaseTest): self.assertFalse(self.boss.isScanning()) self.assertAlmostEqual(startPos + self.scan.range, endPos, delta=0.1) def waitUntil(self, targetTime): while getTimeStamp().value < targetTime: time.sleep(0.1) def getSRTPosition(self, conf_code, servo_name, elevation=45): """Return the servo position related to the elevation. Loading