tidypy
tidypy copied to clipboard
Add prospector-json as a Reporter
Did this while trying to get tidpy to work in vscode, nothing too complex. tries to as closely as possible emulate the prospector json format, though some things had to be faked such as start/end timestamps and duration, as i couldn't figure out whether those were collected or in any way accessible for a Reporter.
test suite + linter should have run and passed.
LGTM. Thanks for contributing!
If you could add a test for it (see test_report_structured.py
for a simple example) and update the README.rst
, I'll merge this right in.
@jayclassless i added a test now, but im unsure how to proceed since it will always fail due to the timestamp changing. i have to get a fake timestamp for the started/stopped keys, which is just the current time, This means that any example will be different from the run by some part of the timestamp.
how can i ignore the timestamps? should i parse the json and compare that way?
how can i ignore the timestamps? should i parse the json and compare that way?
You could parse it and check the resulting dictionary, or you could use something like freezegun to hardcode a "system" time for the duration of the test.