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_memory_loader_fails_invalid fails on Python 3.12 #3065

Closed
hroncok opened this issue Jul 17, 2023 · 0 comments · Fixed by #3066
Closed

test_memory_loader_fails_invalid fails on Python 3.12 #3065

hroncok opened this issue Jul 17, 2023 · 0 comments · Fixed by #3066

Comments

@hroncok
Copy link
Contributor

hroncok commented Jul 17, 2023

Issue

    def test_memory_loader_fails_invalid(value: Any, of_type: type[Any], exception: Exception, msg: str) -> None:
        loader = MemoryLoader(**{"a": value}, kwargs={})
        args = ConfigLoadArgs([], "name", None)
>       with pytest.raises(exception, match=msg):  # type: ignore[call-overload]
E       AssertionError: Regex pattern did not match.
E        Regex: 'expected str, bytes or os.PathLike object'
E        Input: "argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'type'"

args       = <tox.config.loader.api.ConfigLoadArgs object at 0x7f17242dfa40>
exception  = <class 'TypeError'>
loader     = MemoryLoader
msg        = 'expected str, bytes or os.PathLike object'
of_type    = <class 'pathlib.Path'>
value      = <class 'object'>

tests/config/loader/test_memory_loader.py:77: AssertionError

Environment

  • OS: Fedora 39

I will submit a pull request

hroncok added a commit to hroncok/tox that referenced this issue Jul 17, 2023
Fixes tox-dev#3065

New message:

    "argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'type'"
gaborbernat pushed a commit that referenced this issue Jul 17, 2023
Fixes #3065

New message:

    "argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'type'"
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 a pull request may close this issue.

1 participant