Skip to content

Commit

Permalink
Avoid resource warning false positive in unit test (#7769)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby authored Apr 6, 2023
1 parent bd4c6a6 commit 860c838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions tests/console/commands/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def tester(command_tester_factory: CommandTesterFactory) -> CommandTester:

@pytest.fixture()
def old_tester(tester: CommandTester) -> CommandTester:
with pytest.warns(DeprecationWarning):
tester.command.installer.use_executor(False)
tester.command.installer._use_executor = False

return tester

Expand Down
4 changes: 3 additions & 1 deletion tests/console/commands/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def test_build_with_multiple_readme_files(
assert wheel_file.exists()
assert wheel_file.stat().st_size > 0

sdist_content = tarfile.open(sdist_file).getnames()
with tarfile.open(sdist_file) as tf:
sdist_content = tf.getnames()

assert "my_package-0.1/README-1.rst" in sdist_content
assert "my_package-0.1/README-2.rst" in sdist_content

0 comments on commit 860c838

Please sign in to comment.