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

tox -e tests-sqlite crashes #897

Closed
ThomasWaldmann opened this issue Mar 14, 2020 · 2 comments
Closed

tox -e tests-sqlite crashes #897

ThomasWaldmann opened this issue Mar 14, 2020 · 2 comments

Comments

@ThomasWaldmann
Copy link

Current Behavior

tests-sqlite run-test: commands[1] | pytest tests/
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┏━━━━━━━━━━┓  pretalx v1.2.0.dev0                                                      ┃
┃ ┃  ┌─·──╮  ┃  Settings:                                                                ┃
┃ ┃  │  O │  ┃  Database:  /home/vcc/pretalx/src/data/test-sqlite/db.sqlite3 (sqlite3)   ┃
┃ ┃  │ ┌──╯  ┃  Logging:   /home/vcc/pretalx/src/data/test-sqlite/logs                   ┃
┃ ┃  └─┘     ┃  Root dir:  /home/vcc/pretalx/src/pretalx                                 ┃
┃ ┗━━━┯━┯━━━━┛  Python:    /home/vcc/pretalx/.env/bin/python                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/_pytest/main.py", line 187, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/_pytest/config/__init__.py", line 820, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/hooks.py", line 308, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pytest_sugar.py", line 176, in pytest_configure
INTERNALERROR>     sugar_reporter = SugarTerminalReporter(standard_reporter)
INTERNALERROR>   File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pytest_sugar.py", line 214, in __init__
INTERNALERROR>     self.writer = self._tw
INTERNALERROR> AttributeError: can't set attribute
ERROR: InvocationError for command /home/vcc/pretalx/.env/bin/pytest tests/ (exited with code 3)
_________________________________________________________________ summary _________________________________________________________________
ERROR:   tests-sqlite: commands failed

Expected Behavior

Steps to Reproduce

  1. follow the developer docs

Your Environment

  • Version used: current git checkout
  • Environment name and version (e.g. Chrome 39, python 3.5): python 3.7.3
  • Operating System and version (desktop or mobile): debian 10 (buster)
@rixx
Copy link
Member

rixx commented Mar 14, 2020

Thank you for the report!

This seems to be an issue with pytest-sugar, which is incompatible with recent pytest (Teemu/pytest-sugar#187). I'll remove our dependency on pytest-sugar.

@rixx rixx closed this as completed in 301755a Mar 14, 2020
@ThomasWaldmann
Copy link
Author

Thanks, that fixed it! \o/

I get one test failure:

Traceback (most recent call last):
  File "/home/vcc/pretalx/src/tests/agenda/test_agenda_schedule_export.py", line 117, in test_schedule_frab_json_export
    follow=True,
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/pytest_django/fixtures.py", line 471, in _assert_num_queries
    pytest.fail(msg)
  File "/home/vcc/pretalx/.env/lib/python3.7/site-packages/_pytest/outcomes.py", line 158, in fail
    raise Failed(msg=msg, pytrace=pytrace)
Failed: Expected to perform 25 queries or less but 26 were done (add -v option to show queries)

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

2 participants