Skip to content

Commit

Permalink
skip asserting unimplemented feature test results
Browse files Browse the repository at this point in the history
  • Loading branch information
vpa1977 authored and andrewleech committed Jul 2, 2024
1 parent bdaf575 commit 1fcfd7a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/test_litmus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
password = 'pass'
port = 38028

class TestFilter:
_suites = ['props']
_skipping = True

def skipLine(self, line):
if line.startswith("<- summary"):
self._skipping = False
else:
for suite in self._suites:
if line.startswith(f"-> running `{suite}"):
self._skipping = True
break
return self._skipping

class Test(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -69,9 +82,12 @@ def test_run_litmus(self):
results = ex.output
lines = results.decode().split('\n')
assert len(lines), "No litmus output"
filter = TestFilter()
for line in lines:
line = line.split('\r')[-1]
result.append(line)
if filter.skipLine(line):
continue
if len(re.findall(r'^ *\d+\.', line)):
assert line.endswith('pass'), line

Expand Down Expand Up @@ -104,9 +120,12 @@ def test_run_litmus_noauth(self):
results = ex.output
lines = results.decode().split('\n')
assert len(lines), "No litmus output"
filter = TestFilter()
for line in lines:
line = line.split('\r')[-1]
result.append(line)
if filter.skipLine(line):
continue
if len(re.findall(r'^ *\d+\.', line)):
assert line.endswith('pass'), line

Expand Down

0 comments on commit 1fcfd7a

Please sign in to comment.