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

Fix build errors #7

Merged
merged 2 commits into from Apr 24, 2020
Merged

Fix build errors #7

merged 2 commits into from Apr 24, 2020

Conversation

davidag
Copy link
Collaborator

@davidag davidag commented Apr 24, 2020

Two problems have been found in the build:

  1. Because of an incompatibility of python-sugar with pytest 5.4.0 and 5.4.1 this changes are required for the tests to run correctly until a new version of pytest solves it.
View full error message

> Run poetry run invoke tests
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/_pytest/main.py", line 187, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/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/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/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/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/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/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pytest_sugar.py", line 176, in pytest_configure
INTERNALERROR>     sugar_reporter = SugarTerminalReporter(standard_reporter)
INTERNALERROR>   File "/home/runner/.cache/pypoetry/virtualenvs/pelican-webring-yOIIE9ev-py3.7/lib/python3.7/site-packages/pytest_sugar.py", line 214, in __init__
INTERNALERROR>     self.writer = self._tw
INTERNALERROR> AttributeError: can't set attribute
##[error]Process completed with exit code 3.

  1. The Pelican dev version was not being used, which caused an import error when running tests depending on the module pelican.tests:
View full error message

ImportError while importing test module '/home/runner/work/webring/webring/pelican/plugins/webring/test_webring.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
pelican/plugins/webring/test_webring.py:14: in <module>
    from pelican.tests.support import get_context, get_settings, module_exists
E   ModuleNotFoundError: No module named 'pelican.tests'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!

This should be corrected in pytest 5.4.2. Until then, this is required
in order for the tests to be run.
This is required to be able to use the module pelican.tests in the
tests.
@davidag davidag changed the title Fix build due to pytest-sugar bug Fix build errors Apr 24, 2020
@davidag davidag merged commit 58d9aa5 into master Apr 24, 2020
@davidag davidag deleted the fix-build-pytest branch April 24, 2020 17:19
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

Successfully merging this pull request may close these issues.

None yet

1 participant