Commit f43a936a authored by Christopher Turner's avatar Christopher Turner

Refactoring

parent d8a8c178
...@@ -36,4 +36,3 @@ class EncoderLB(Encoder.Encoder): ...@@ -36,4 +36,3 @@ class EncoderLB(Encoder.Encoder):
self.outputs[0]: self.inputs[0] self.outputs[0]: self.inputs[0]
} }
self.toggle_val('OUTENC', '', 'INENC', '', default_val) self.toggle_val('OUTENC', '', 'INENC', '', default_val)
...@@ -75,13 +75,15 @@ class LoopBack(PandATest.PandATest): ...@@ -75,13 +75,15 @@ class LoopBack(PandATest.PandATest):
''.join(['-']*28) ''.join(['-']*28)
)) ))
for attempt in [1, 2]: for attempt in [1, 2]:
self.logger.info('---- ATTEMPT {} {}'.format(attempt, ''.join(['-']*28))) self.logger.info('---- ATTEMPT {} {}'.format(
attempt, ''.join(['-']*28)))
test_cls.test_code() test_cls.test_code()
if test_cls.test_result.count(0) != 0 and attempt == 1: if test_cls.test_result.count(0) != 0 and attempt == 1:
test_cls.test_result = [] test_cls.test_result = []
os.system( os.system(
"./load-state {} base.state".format(self.hostname)) "./load-state {} base.state".format(self.hostname))
self.check_connectors(test_cls.__class__.__name__, test_cls.blocknum) self.check_connectors(
test_cls.__class__.__name__, test_cls.blocknum)
elif test_cls.test_result.count(0) == 0: elif test_cls.test_result.count(0) == 0:
print 'TEST PASSED! ({} {})'.format(test_cls.__class__.__name__, print 'TEST PASSED! ({} {})'.format(test_cls.__class__.__name__,
test_cls.blocknum) test_cls.blocknum)
...@@ -109,11 +111,6 @@ class LoopBack(PandATest.PandATest): ...@@ -109,11 +111,6 @@ class LoopBack(PandATest.PandATest):
def check_connectors(self, test, block_no): def check_connectors(self, test, block_no):
inputy = '.' inputy = '.'
while inputy not in ['']: while inputy not in ['']:
print "TEST FAILED! ({} {}), Check connectors connected [return]".format(test, block_no) print "TEST FAILED! ({} {})," \
" Check connectors connected [return]".format(test, block_no)
inputy = raw_input() inputy = raw_input()
Markdown is supported
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