Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roch1990 committed Jun 6, 2020
1 parent 6b5b86c commit 09c4a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions peon/tests/test_lint/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@


def test_sucess():
with pytest.raises(SystemExit):
assert Lint(TestProjectTree().project_tree.inspect(), output_channel=ReportChannels.stdout).project() is None
assert Lint(TestProjectTree().project_tree.inspect(), output_channel=ReportChannels.stdout).project() is None


def test_none_path():
Expand All @@ -16,5 +15,4 @@ def test_none_path():


def test_empty_project():
with pytest.raises(SystemExit):
assert Lint([], output_channel=ReportChannels.stdout).project() is None
assert Lint([], output_channel=ReportChannels.stdout).project() is None
8 changes: 4 additions & 4 deletions peon/tests/test_lint/test_report/test_to_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ def test_constructor():


def test_text_is_none():
assert Report(text=None, channel=ReportChannels.stdout).to_stdout() is None
assert Report(text=None, channel=ReportChannels.stdout).to_stdout() is False


def test_text_is_empty():
assert Report(text='', channel=ReportChannels.stdout).to_stdout() is None
assert Report(text='', channel=ReportChannels.stdout).to_stdout() is False


def test_text_is_filled():
assert Report(text='test message', channel=ReportChannels.stdout).to_stdout() is None
assert Report(text='test message', channel=ReportChannels.stdout).to_stdout() is True


def test_text_has_wrong_type():
assert Report(text=[], channel=ReportChannels.stdout).to_stdout() is None
assert Report(text=[], channel=ReportChannels.stdout).to_stdout() is False

0 comments on commit 09c4a9c

Please sign in to comment.