-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Currently, files assertions are made on strings. It would be handy to accept pathlib.Path objects as it is what the pytest tmp_path fixture returns :
from assertpy import assert_that
def test_foo(tmp_path):
f = tmp_path / "bar"
f.touch()
asset_that(f).is_a_file()fails with :
TypeError: val is not a pathYou need to make it a string :
assert_that(str(f)).is_a_file()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels