Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

update py.test to 2.9.2 #2661

Merged
merged 1 commit into from
Jul 4, 2016
Merged

update py.test to 2.9.2 #2661

merged 1 commit into from
Jul 4, 2016

Conversation

RonnyPfannschmidt
Copy link
Contributor

No description provided.

@dajoRH dajoRH added the lint-ok label Feb 11, 2016
@psav
Copy link
Contributor

psav commented Feb 11, 2016

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?

@RonnyPfannschmidt
Copy link
Contributor Author

hookwrapper and historic hooks are incompatible
historic hooks redo all invocation on registration of new plugins,
a wrapper is semantically incompatible with such an invocation at a later point in time

@psav
Copy link
Contributor

psav commented Feb 11, 2016

So then, I need to figure out on this branch what is going on with artifactor before it can be merged

@psav psav self-assigned this Feb 17, 2016
@@ -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):
Copy link
Contributor

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'

@psav
Copy link
Contributor

psav commented Mar 10, 2016

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.

@RonnyPfannschmidt RonnyPfannschmidt changed the title update py.test to 2.8.7 update py.test to 2.9.0 May 25, 2016
@RonnyPfannschmidt RonnyPfannschmidt changed the title update py.test to 2.9.0 update py.test to 2.9.2 Jun 2, 2016
@jkrocil
Copy link
Contributor

jkrocil commented Jul 4, 2016

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
@dajoRH
Copy link
Contributor

dajoRH commented Jul 4, 2016

Lint report for commit 4080663:

Everything seems all right 😄 .
CFME QE Bot

@psav psav added the reviewed label Jul 4, 2016
@psav psav merged commit a53eeee into ManageIQ:master Jul 4, 2016
@RonnyPfannschmidt RonnyPfannschmidt deleted the pytest-update branch July 6, 2016 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants