Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testmon >=2.0.0 does not work with pytest-xdist #234

Open
szym opened this issue Jun 29, 2024 · 1 comment
Open

testmon >=2.0.0 does not work with pytest-xdist #234

szym opened this issue Jun 29, 2024 · 1 comment

Comments

@szym
Copy link

szym commented Jun 29, 2024

What is your setup and what steps did you do?

pip install pytest-testmon==2.1.1 pytest-xdist==3.6.1
pytest -n2 --testmon

What was the outcome?

initialized: 2/2 workersINTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/_pytest/main.py", line 281, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/_pytest/config/__init__.py", line 1130, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/pluggy/_hooks.py", line 535, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/testmon/pytest_testmon.py", line 239, in pytest_configure
INTERNALERROR>     init_testmon_data(config)
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/testmon/pytest_testmon.py", line 174, in init_testmon_data
INTERNALERROR>     testmon_data = TestmonData(
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/testmon/testmon_core.py", line 163, in __init__
INTERNALERROR>     result = self.db.initiate_execution(
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/testmon/db.py", line 696, in initiate_execution
INTERNALERROR>     exec_id, packages_changed = self.fetch_or_create_environment(
INTERNALERROR>   File "/Users/szym/Library/Python/3.8/lib/python/site-packages/testmon/db.py", line 641, in fetch_or_create_environment
INTERNALERROR>     con.execute("BEGIN IMMEDIATE TRANSACTION")
INTERNALERROR> sqlite3.OperationalError: attempt to write a readonly database

What did you expect instead?
Don't crash.

What is your operating system and it's version please?
macOS 11.7

szym referenced this issue Jun 29, 2024
…xes re #203 sqlite3.OperationalError: database is locked .
@szym
Copy link
Author

szym commented Jun 29, 2024

I think this broke with v2 which added db writes in TestmonData.__init__: 6746483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant