Skip to content

Add test to run tox warning-free in a subprocess. #564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

samcunliffe
Copy link
Member

@samcunliffe samcunliffe commented Jul 16, 2025

Reproduces #560. Should fail!

@samcunliffe samcunliffe changed the title Add test to run tox in a subprocess. Add test to run tox warning-free in a subprocess. Jul 16, 2025
@samcunliffe samcunliffe requested a review from Copilot July 24, 2025 10:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new test to verify that tox runs warning-free in a subprocess, which appears to be designed to reproduce issue #560 and is expected to fail initially.

  • Adds test_package_tests_tox function to verify tox environments run without warnings
  • Implements subprocess execution of tox with output capture for validation
  • Includes assertion logic to check both test success and absence of warnings

Comment on lines +178 to +179
return
output = tox_multienv_test_process.stdout.decode()
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion checks stdout for warnings, but many tools including tox typically output warnings to stderr. The warning check should examine stderr instead of stdout.

Suggested change
return
output = tox_multienv_test_process.stdout.decode()
output = tox_multienv_test_process.stderr.decode()

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should check both.

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