Skip to content

BUG: launching pytest --tally from subdirectory results in crash #10

@jeffwright13

Description

@jeffwright13
2951 -- /Users/jwr003/repos/QAF-831/venv/bin/gems-qa-tests --tui --tally --keepreports --co -k test_stackable_expressions_single\ and\ Follower 

------------------------------------------------------------------------------- live log sessionstart --------------------------------------------------------------------------------
INFO     2023-04-18 07:15:12 gems_qa_tests.conftest         Conftest Session start
INFO     2023-04-18 07:15:12 gems_qa_tests.conftest         Checking for project specific tests in: /Users/jwr003/repos/agl-tib/qa
INFO     2023-04-18 07:15:12 gems_qa_tests.conftest         Adding project specific tests from: /Users/jwr003/repos/agl-tib/qa
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/_pytest/main.py", line 267, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pytest_tally/plugin.py", line 93, in pytest_sessionstart
INTERNALERROR>     write_json_to_file(session.config, get_data_file())
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pytest_tally/plugin.py", line 78, in write_json_to_file
INTERNALERROR>     lock_utils = LocakbleJsonFileUtils(file_path=filename)
INTERNALERROR>   File "/Users/jwr003/repos/QAF-831/venv/lib/python3.9/site-packages/pytest_tally/utils.py", line 35, in __init__
INTERNALERROR>     assert file_path.exists(), f"File {file_path} must exist"
INTERNALERROR> AssertionError: File /Users/jwr003/repos/QAF-831/gems_qa_tests/data.json must exist
INTERNALERROR> assert False
INTERNALERROR>  +  where False = <bound method Path.exists of PosixPath('/Users/jwr003/repos/QAF-831/gems_qa_tests/data.json')>()
INTERNALERROR>  +    where <bound method Path.exists of PosixPath('/Users/jwr003/repos/QAF-831/gems_qa_tests/data.json')> = PosixPath('/Users/jwr003/repos/QAF-831/gems_qa_tests/data.json').exists

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions