Skip to content

Commit

Permalink
update invariant cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanKepner committed Jan 17, 2020
1 parent b5a5d2f commit 58ad250
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mutatest/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,6 @@ def test_parse_ini_config_with_cli_overrides(mock_ini_file):
# PROPERTY TESTS
####################################################################################################

TEXT_STRATEGY = st.text(alphabet=st.characters(blacklist_categories=("Cs", "Cc", "Po")), min_size=1)


# no arguments, so no given assumption
def test_cli_epilog_invariant():
Expand All @@ -487,15 +485,19 @@ def test_cli_epilog_invariant():
assert len(result) > 1


@given(TEXT_STRATEGY.map(lambda x: Path(x)), st.integers(), st.integers())
def test_cli_summary_report_invariant(mock_args, mock_TrialTimes, s, lm, li):
@given(st.integers(), st.integers())
def test_cli_summary_report_invariant(mock_args, mock_TrialTimes, lm, li):
"""Property:
1. cli_summary report returns a valid string without errors given any set of integers for
locs_mutated and locs_identified.
"""

results = cli.cli_summary_report(
src_loc=s, args=mock_args, locs_mutated=lm, locs_identified=li, runtimes=mock_TrialTimes
src_loc=Path("file.py"),
args=mock_args,
locs_mutated=lm,
locs_identified=li,
runtimes=mock_TrialTimes,
)

assert isinstance(results, str)
Expand Down

0 comments on commit 58ad250

Please sign in to comment.