Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip asserting unimplemented feature test results #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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