Try separating Quokka and taipan tests
This commit is contained in:
@ -68,6 +68,10 @@ class Able(unittest.TestCase):
|
|||||||
instrument_name = result[0].split("=")[1].strip().lower()
|
instrument_name = result[0].split("=")[1].strip().lower()
|
||||||
if debug:
|
if debug:
|
||||||
print "Instrument:", instrument_name
|
print "Instrument:", instrument_name
|
||||||
|
if instrument_name == "quokka":
|
||||||
|
Quokka.skip = False
|
||||||
|
if instrument_name == "taipan":
|
||||||
|
Taipan.skip = False
|
||||||
d = self.send_command("instrument")
|
d = self.send_command("instrument")
|
||||||
d.addCallback(cb1)
|
d.addCallback(cb1)
|
||||||
return d
|
return d
|
||||||
@ -256,6 +260,8 @@ class Baker(Able):
|
|||||||
|
|
||||||
def test_003_001_motors(self):
|
def test_003_001_motors(self):
|
||||||
debug = False
|
debug = False
|
||||||
|
if instrument_name != "taipan":
|
||||||
|
raise unittest.SkipTest("Cannot test motor m1, m2: not taipan")
|
||||||
def cb(result, *args, **kw):
|
def cb(result, *args, **kw):
|
||||||
if debug:
|
if debug:
|
||||||
print "\nLV:", result, args, kw
|
print "\nLV:", result, args, kw
|
||||||
@ -648,6 +654,32 @@ class Python(Able):
|
|||||||
d.addCallback(cb, 1)
|
d.addCallback(cb, 1)
|
||||||
return self.deferred
|
return self.deferred
|
||||||
|
|
||||||
|
class Quokka(Able):
|
||||||
|
skip = True
|
||||||
|
def test_000_000_motors(self):
|
||||||
|
global motors
|
||||||
|
if instrument_name != "quokka":
|
||||||
|
raise unittest.SkipTest("Instrument is not Quokka")
|
||||||
|
missing = []
|
||||||
|
for m in ["samx", "samy", "samz", "det", "detoff", "bsx"]:
|
||||||
|
if m not in motors:
|
||||||
|
missing.append(m)
|
||||||
|
if instrument_name == "taipan" and len(missing) > 0:
|
||||||
|
raise Exception("Missing motors:" + repr(missing))
|
||||||
|
|
||||||
|
class Taipan(Able):
|
||||||
|
skip = True
|
||||||
|
def test_000_000_motors(self):
|
||||||
|
global motors
|
||||||
|
if instrument_name != "taipan":
|
||||||
|
raise unittest.SkipTest("Instrument is not Taipan")
|
||||||
|
missing = []
|
||||||
|
for m in ["m1", "m2", "s1", "s2", "a1", "a2"]:
|
||||||
|
if m not in motors:
|
||||||
|
missing.append(m)
|
||||||
|
if instrument_name == "taipan" and len(missing) > 0:
|
||||||
|
raise Exception("Missing motors:" + repr(missing))
|
||||||
|
|
||||||
class Zulu(Able):
|
class Zulu(Able):
|
||||||
timeout = 5
|
timeout = 5
|
||||||
def test_performance(self):
|
def test_performance(self):
|
||||||
|
Reference in New Issue
Block a user