-
-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels