Skip to content

test: use pytest fixtures and os.devnull fixes - #2031

Open
TrueFurina wants to merge 1 commit into
smicallef:masterfrom
TrueFurina:pr8-tests
Open

test: use pytest fixtures and os.devnull fixes#2031
TrueFurina wants to merge 1 commit into
smicallef:masterfrom
TrueFurina:pr8-tests

Conversation

@TrueFurina

Copy link
Copy Markdown

Summary

438 test files decorate their unittest.TestCase classes with
@pytest.mark.usefixtures (no arguments). With no fixture names, the marker
is a no-op — pytest flags it on every run:

PytestWarning: usefixtures() in test/... without arguments has no effect

That produced ~1,500 PytestWarnings across the test suite. This PR removes
the no-op decorator line from all 438 files. Zero behavior change — the
classes are unittest.TestCase subclasses and no fixtures are involved.

Verification

  • pytest test/unit before: 1529 passed, 1 failed, 30 skipped, 1501 warnings
  • pytest test/unit after: 1529 passed, 1 failed, 30 skipped, 0 warnings
    (the 1 remaining failure, test_resolve_host6_should_return_a_list, is a
    DNS-network-dependent test unrelated to this change — it fails identically
    without the change on this machine)
  • grep -c "usefixtures()" test/ → 0 remaining

Files changed

  • 438 files under test/ (one decorator line removed each)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant