Skip to content
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

test_verbosity_guess_miss_match fails with sources from PyPI #2839

Closed
frenzymadness opened this issue Jan 9, 2023 · 2 comments
Closed

test_verbosity_guess_miss_match fails with sources from PyPI #2839

frenzymadness opened this issue Jan 9, 2023 · 2 comments
Labels
bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@frenzymadness
Copy link

If you take tox sources from PyPI, there is no tox.ini file in them, which makes test_verbosity_guess_miss_match fail because tox complains about missing config file and therefore the output is not as expected.

The output is:

tests/config/cli/test_parse.py::test_verbosity_guess_miss_match FAILED
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

capsys = <_pytest.capture.CaptureFixture object at 0x7fc51dd0b350>

    def test_verbosity_guess_miss_match(capsys: CaptureFixture) -> None:
        result = get_options("-rv")
        assert result.parsed.verbosity == 3
    
        assert logging.getLogger().level == logging.INFO
    
        for name in ("distlib.util", "filelock"):
            logger = logging.getLogger(name)
            assert logger.disabled
        logging.error("E")
        logging.warning("W")
        logging.info("I")
        logging.debug("D")
    
        out, err = capsys.readouterr()
>       assert out == "ROOT: E\nROOT: W\nROOT: I\n"
E       AssertionError: assert 'ROOT: No tox... W\nROOT: I\n' == 'ROOT: E\nROOT: W\nROOT: I\n'
E         + ROOT: No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini at /builddir/build/BUILD/tox-4.2.6
E           ROOT: E
E           ROOT: W
E           ROOT: I

capsys     = <_pytest.capture.CaptureFixture object at 0x7fc51dd0b350>
err        = ''
logger     = <Logger filelock (INFO)>
name       = 'filelock'
out        = 'ROOT: No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini at /builddir/build/BUILD/tox-4.2.6\nROOT: E\nROOT: W\nROOT: I\n'
result     = Options(parsed=Parsed(colored='no', verbose=3, quiet=0, exit_and_dump_after=0, config_file=None, work_dir=None, root_d...acy': <function legacy at 0x7fc51df1e0c0>, 'le': <function legacy at 0x7fc51df1e0c0>}, log_handler=<ToxHandler (INFO)>)

tests/config/cli/test_parse.py:35: AssertionError
@gaborbernat
Copy link
Member

This falls under the flag of not being supported by core tox, but we'll accept a PR 😊 to fix this.

@gaborbernat gaborbernat added bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. labels Jan 9, 2023
@hroncok
Copy link
Contributor

hroncok commented Apr 12, 2023

Fixed in #2939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

3 participants