Closed chrahunt closed 5 years ago
Well there are a bunch of ways to deal with this problem:
filename
- tho I'm not a fan of breaking backwards compatabsfilename
fieldfilename_ew="test.py"
or filename_endswith="test.py"
basename
field (eg: basename="test.py"
)Ah, now I noticed you complained about the docstring. Hmmm ... so making it absolute would be problematic when tracing code that changes cwd at least. Lemme try some experiments...
So uh, compromise to fixing docstring and adding basename?
Fine by me.
Fixed in 310d1542671946a78c2a543fa2acbe87bfe68bbb.
The docs of
hunter.Event.filename
state that it returns an absolute pathhttps://github.com/ionelmc/python-hunter/blob/b3a1310b0593d2c6b6ef430883843896e17d6a81/src/hunter/event.py#L178
That is not true in all cases.
Environment
Test
The expected behavior would be for
$PWD/test.py
to match and output to be generated - but instead it only works when providing a relative path.