Commit f1034f6c authored by Valentin Valls's avatar Valentin Valls
Browse files

Make all python test files ready for pytest

parent ada9e9a2
......@@ -31,7 +31,7 @@ test:
imports:
- Lima.Simulator
commands:
- pytest test/test.py test/test_tango.py
- pytest test
about:
home: https://github.com/esrf-bliss/Lima
......
......@@ -32,8 +32,8 @@ from Lima import Simulator
Core.DEB_GLOBAL(Core.DebModTest)
class TestControl:
Core.DEB_CLASS(Core.DebModTest, 'TestControl')
class CheckControl:
Core.DEB_CLASS(Core.DebModTest, 'CheckControl')
class ImageStatusCallback(Core.CtControl.ImageStatusCallback):
def __init__(self, test_control, cb_end):
......@@ -101,11 +101,11 @@ class TestControl:
data = b' ' + image.buffer.tostring()
class TestControlAutoSync:
Core.DEB_CLASS(Core.DebModTest, 'TestControlAutoSync')
class CheckControlAutoSync:
Core.DEB_CLASS(Core.DebModTest, 'CheckControlAutoSync')
def __init__(self):
self.test_control = TestControl()
self.test_control = CheckControl()
self.traceRefCount(1)
def __del__(self):
......@@ -136,7 +136,7 @@ def main(argv):
exp_time = 0.1
test_control = TestControlAutoSync()
test_control = CheckControlAutoSync()
i = 0
nb_frames = 2
......@@ -167,5 +167,10 @@ def main(argv):
if not ok:
raise RuntimeError('Expected exception: %s' % err)
def test_prepare_timeout():
main([])
if __name__ == '__main__':
main(sys.argv)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment