config: improve typing

This commit is contained in:
Ran Benita
2020-06-21 00:34:41 +03:00
parent 83891d9022
commit 4655b79985
12 changed files with 143 additions and 91 deletions

View File

@@ -372,7 +372,7 @@ def test_excinfo_no_python_sourcecode(tmpdir):
for item in excinfo.traceback:
print(item) # XXX: for some reason jinja.Template.render is printed in full
item.source # shouldn't fail
if item.path.basename == "test.txt":
if isinstance(item.path, py.path.local) and item.path.basename == "test.txt":
assert str(item.source) == "{{ h()}}:"