Loading Common/Interfaces/MinorServoInterface/test/PyMinorServoTest/simunittest.py +4 −4 Original line number Diff line number Diff line import os import sys import time import unittest2 import unittest import subprocess def run(test_case): Loading @@ -14,11 +14,11 @@ def run(test_case): try: subprocess.Popen(['%s-sim' % server_name, 'start'], stdout=FNULL, stderr=FNULL) time.sleep(1) # Give the server the time to start suite = unittest2.TestSuite() tests = unittest2.TestLoader().loadTestsFromTestCase(test_case) suite = unittest.TestSuite() tests = unittest.TestLoader().loadTestsFromTestCase(test_case) suite.addTests(tests) print 'Running the tests using the antenna simulators...' unittest2.TextTestRunner(verbosity=2).run(suite) unittest.TextTestRunner(verbosity=2).run(suite) finally: subprocess.Popen(['%s-sim' % server_name, 'stop'], stdout=FNULL, stderr=FNULL) time.sleep(2) # Give the server the time to stop Common/Interfaces/MinorServoInterface/test/functional/commands/test_servoSetup.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestServoSetupCmd(unittest2.TestCase): class TestServoSetupCmd(unittest.TestCase): """Test the servoSetup command""" telescope = os.getenv('STATION') Loading Loading @@ -56,7 +56,7 @@ class TestServoSetupCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: from PyMinorServoTest import simunittest simunittest.run(TestServoSetupCmd) Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoASConfiguration.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -17,7 +17,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoASConfigurationCmd(unittest2.TestCase): class TestSetServoASConfigurationCmd(unittest.TestCase): """Test the setServoASConfiguration command""" telescope = os.getenv('STATION') Loading @@ -39,6 +39,6 @@ class TestSetServoASConfigurationCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: simunittest.run(TestSetServoASConfigurationCmd) Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoElevationTracking.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoElevationTrackingCmd(unittest2.TestCase): class TestSetServoElevationTrackingCmd(unittest.TestCase): """Test the setServoElevationTracking command""" telescope = os.getenv('STATION') Loading @@ -40,7 +40,7 @@ class TestSetServoElevationTrackingCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: from PyMinorServoTest import simunittest simunittest.run(TestSetServoElevationTrackingCmd) Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoOffset.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoOffsetCmd(unittest2.TestCase): class TestSetServoOffsetCmd(unittest.TestCase): """Test the setServoOffset command""" telescope = os.getenv('STATION') Loading @@ -35,4 +35,4 @@ class TestSetServoOffsetCmd(unittest2.TestCase): if __name__ == '__main__': unittest2.main() unittest.main() Loading
Common/Interfaces/MinorServoInterface/test/PyMinorServoTest/simunittest.py +4 −4 Original line number Diff line number Diff line import os import sys import time import unittest2 import unittest import subprocess def run(test_case): Loading @@ -14,11 +14,11 @@ def run(test_case): try: subprocess.Popen(['%s-sim' % server_name, 'start'], stdout=FNULL, stderr=FNULL) time.sleep(1) # Give the server the time to start suite = unittest2.TestSuite() tests = unittest2.TestLoader().loadTestsFromTestCase(test_case) suite = unittest.TestSuite() tests = unittest.TestLoader().loadTestsFromTestCase(test_case) suite.addTests(tests) print 'Running the tests using the antenna simulators...' unittest2.TextTestRunner(verbosity=2).run(suite) unittest.TextTestRunner(verbosity=2).run(suite) finally: subprocess.Popen(['%s-sim' % server_name, 'stop'], stdout=FNULL, stderr=FNULL) time.sleep(2) # Give the server the time to stop
Common/Interfaces/MinorServoInterface/test/functional/commands/test_servoSetup.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestServoSetupCmd(unittest2.TestCase): class TestServoSetupCmd(unittest.TestCase): """Test the servoSetup command""" telescope = os.getenv('STATION') Loading Loading @@ -56,7 +56,7 @@ class TestServoSetupCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: from PyMinorServoTest import simunittest simunittest.run(TestServoSetupCmd)
Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoASConfiguration.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -17,7 +17,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoASConfigurationCmd(unittest2.TestCase): class TestSetServoASConfigurationCmd(unittest.TestCase): """Test the setServoASConfiguration command""" telescope = os.getenv('STATION') Loading @@ -39,6 +39,6 @@ class TestSetServoASConfigurationCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: simunittest.run(TestSetServoASConfigurationCmd)
Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoElevationTracking.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoElevationTrackingCmd(unittest2.TestCase): class TestSetServoElevationTrackingCmd(unittest.TestCase): """Test the setServoElevationTracking command""" telescope = os.getenv('STATION') Loading @@ -40,7 +40,7 @@ class TestSetServoElevationTrackingCmd(unittest2.TestCase): if __name__ == '__main__': if 'Configuration' in os.getenv('ACS_CDB'): unittest2.main() # Real test using the antenna CDB unittest.main() # Real test using the antenna CDB else: from PyMinorServoTest import simunittest simunittest.run(TestSetServoElevationTrackingCmd)
Common/Interfaces/MinorServoInterface/test/functional/commands/test_setServoOffset.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from __future__ import with_statement import os import math import time import unittest2 import unittest import MinorServo import Management Loading @@ -16,7 +16,7 @@ from Acspy.Common.TimeHelper import getTimeStamp __author__ = "Marco Buttu <mbuttu@oa-cagliari.inaf.it>" class TestSetServoOffsetCmd(unittest2.TestCase): class TestSetServoOffsetCmd(unittest.TestCase): """Test the setServoOffset command""" telescope = os.getenv('STATION') Loading @@ -35,4 +35,4 @@ class TestSetServoOffsetCmd(unittest2.TestCase): if __name__ == '__main__': unittest2.main() unittest.main()