-
Notifications
You must be signed in to change notification settings - Fork 164
Conversation
This one passed, but artifactor produced no output, it is a bit fickle on when things are setup and I wonder if the hookwrapper removal has had an effect. Is this a required change to go to newer pytest? |
hookwrapper and historic hooks are incompatible |
So then, I need to figure out on this branch what is going on with artifactor before it can be merged |
@@ -92,7 +92,7 @@ def pytest_addoption(parser): | |||
help="A run id to assist in logging") | |||
|
|||
|
|||
@pytest.mark.hookwrapper | |||
@pytest.mark.tryfirst | |||
def pytest_configure(config): | |||
global proc | |||
if not SLAVEID and not proc and isinstance(art_client, ArtifactorClient): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RonnyPfannschmidt So I figured it out, there is a yield
that needs to be removed below to make this work.
However then it crashes a little further on......I get this with pytest 2.9 also.
If I try to from fixtures.pytest_store import store
I get an error like the following
Traceback (most recent call last):
File "/home/cfme_tests/utils/artifactor_start.py", line 3, in
from artifactor import Artifactor, initialize
File "/home/cfme_tests/artifactor/init.py", line 134, in
from utils.net import random_port
File "/home/cfme_tests/utils/net.py", line 5, in
from fixtures.pytest_store import store
File "/home/cfme_tests/fixtures/pytest_store.py", line 25, in
from _pytest.terminal import TerminalReporter
File "/home/default/lib/python2.7/site-packages/_pytest/terminal.py", line 5, in
from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_INTERRUPTED,
File "/home/default/lib/python2.7/site-packages/_pytest/main.py", line 5, in
import pytest, _pytest
File "/home/default/lib/python2.7/site-packages/pytest.py", line 27, in
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
File "/home/default/lib/python2.7/site-packages/_pytest/config.py", line 75, in _preloadplugins
_preinit.append(get_config())
File "/home/default/lib/python2.7/site-packages/_pytest/config.py", line 84, in get_config
pluginmanager.import_plugin(spec)
File "/home/default/lib/python2.7/site-packages/_pytest/config.py", line 384, in import_plugin
import(importspec)
File "/home/default/lib/python2.7/site-packages/_pytest/python.py", line 400, in
class PyCollector(PyobjMixin, pytest.Collector):
AttributeError: 'module' object has no attribute 'Collector'
This seems to work fine for parallelized and singular runs - @amavinag we need to get a parallelized job on jenkins so that we can test this. It's a relatively big change, but a necessary one. |
All the changes look reasonable to me 👍 |
* fix most scope mismatches * parallelizer: use pluginmanager.add_hookspecs * store plugin: trigger pytest early pluginmanager witout that import which triggers initial setup, looking into the internals of pytest will fail * parallelizer: update to the new pytest internal api there is now a _pytest.config.get_config function altered plugin consideration requires us to disable the parallelizer plugin on the slave side
Lint report for commit 4080663: Everything seems all right 😄 . |
No description provided.