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

Use py.test as test runner #1024

Merged
merged 5 commits into from Mar 5, 2015

Conversation

4 participants
@jodal
Member

jodal commented Mar 4, 2015

No description provided.

@jodal jodal added this to the v0.20 - Audio cleanup 1 milestone Mar 4, 2015

tox.ini Outdated
@@ -3,20 +3,20 @@ envlist = py27, py27-tornado23, py27-tornado31, docs, flake8
[testenv]
sitepackages = true
commands = nosetests -v --with-xunit --xunit-file=xunit-{envname}.xml --with-coverage --cover-package=mopidy
commands = py.test --junit-xml=xunit-{envname}.xml --cov=mopidy

This comment has been minimized.

@ZenithDK

ZenithDK Mar 5, 2015

Contributor

Could this be changed to using pytest-xdist to distribute the test run to more processes?
http://tox.readthedocs.org/en/latest/example/pytest.html#using-multiple-cpus-for-test-runs

This comment has been minimized.

@jodal

jodal Mar 5, 2015

Member

There's seems to be some issue with our test suite making py.test -n 6 for example as slow as or slower than -n 1. I'll add pytest-xdist to the deps list in tox.ini too, and add {posargs} to the command. That way, we can experiment with e.g. tox -e py27 -- -n 6. When it works properly, we can make parallel execution the default.

This comment has been minimized.

@adamcik

adamcik Mar 5, 2015

Member

From my experience with nose --processes=12 I would suspect the
introspection in the deprecated property call. Try short circuiting that
check and see if it helps.

On Thu, Mar 5, 2015 at 9:09 AM, Stein Magnus Jodal <notifications@github.com

wrote:

In tox.ini
#1024 (comment):

@@ -3,20 +3,20 @@ envlist = py27, py27-tornado23, py27-tornado31, docs, flake8

[testenv]
sitepackages = true
-commands = nosetests -v --with-xunit --xunit-file=xunit-{envname}.xml --with-coverage --cover-package=mopidy
+commands = py.test --junit-xml=xunit-{envname}.xml --cov=mopidy

There's seems to be some issue with our test suite making py.test -n 6
for example as slow as or slower than -n 1. I'll add pytest-xdist to the
deps list in tox.ini too, and add {posargs} to the command. That way, we
can experiment with e.g. tox -e py27 -- -n 6. When it works properly, we
can make parallel execution the default.


Reply to this email directly or view it on GitHub
https://github.com/mopidy/mopidy/pull/1024/files#r25845323.

This comment has been minimized.

@jodal

jodal Mar 5, 2015

Member

Confirmed.

I removed the inspect+warnings code, leaving the empty decorator in place as a place to add e.g. logging when cleaning up code using deprecated properties.

jodal added some commits Mar 5, 2015

core: Remove deprecated property warnings
Their use of inspect (I think) made parallel test execution slower than
serial test execution.

adamcik added a commit that referenced this pull request Mar 5, 2015

Merge pull request #1024 from jodal/feature/pytest
Use py.test as test runner

@adamcik adamcik merged commit a760833 into mopidy:develop Mar 5, 2015

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kingosticks

This comment has been minimized.

Member

kingosticks commented Mar 5, 2015

Is this now the suggested test framework? Does cookie cutter need to
reflect this?
On 5 Mar 2015 19:50, "Thomas Adamcik" notifications@github.com wrote:

Merged #1024 #1024.


Reply to this email directly or view it on GitHub
#1024 (comment).

@jodal jodal deleted the jodal:feature/pytest branch Mar 5, 2015

@jodal

This comment has been minimized.

Member

jodal commented Mar 5, 2015

Yes, I plan to make a pull request for it too.

jodal added a commit that referenced this pull request Mar 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment