Skip to content

Commit

Permalink
git push origin master0;115;0cMerge branch 'best-doctor-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
micheller committed Nov 30, 2020
2 parents 9ba2460 + f503fbd commit c81fa1a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_integration/test_usefixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ def test_fixtures_should_be_in_usefixtures(run_validator_for_test_files):
assert errors[0][2] == expected_error_message


def test_testclass_self_or_cls_not_included_into_fixtures_list(
run_validator_for_test_files,
):
expected_error_message = (
'FP009 test_one should use '
"fixtures as follows: @pytest.mark.usefixtures('capsys')"
)

errors = run_validator_for_test_files('test_class_with_fixtures.py')

assert len(errors) == 1
assert errors[0][2] == expected_error_message


def test_fixtures_should_be_in_usefixtures_but_validator_is_disabled(
run_validator_for_test_files,
):
Expand Down

0 comments on commit c81fa1a

Please sign in to comment.