Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP5
python-pytest-ordering
pytest-ordering-pr55-registermarks.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pytest-ordering-pr55-registermarks.patch of Package python-pytest-ordering
From 6de05faa7d399a3f0f99b33b75747d39adb1f535 Mon Sep 17 00:00:00 2001 From: Brian Maissy <brian.maissy@gmail.com> Date: Fri, 31 May 2019 03:03:38 +0300 Subject: [PATCH] register marks, document python and pytest dependencies, and test the full matrix with tox and travis --- .travis.yml | 20 +++++++++++--------- AUTHORS | 1 + docs/source/index.rst | 6 ++++++ pytest_ordering/__init__.py | 14 ++++++++++++-- setup.py | 9 +++++---- tests/test_ordering.py | 7 +++++-- tox.ini | 17 ++++++++++++++--- 7 files changed, 54 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index e37fd0c..f88c371 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,18 @@ +dist: xenial language: python -python: "3.5" -env: - - TOX_ENV=py35 - - TOX_ENV=py34 - - TOX_ENV=py33 - - TOX_ENV=py27 - - TOX_ENV=py26 +python: + - "2.7" + - "3.4" + - "3.5" + - "3.6" + - "3.7" + - "pypy" install: - pip install tox - pip install python-coveralls script: - - tox -e $TOX_ENV + - TOX_PYTHON_VERSION=$(if [ $TRAVIS_PYTHON_VERSION = "pypy" ]; then echo "pypy"; else echo py$TRAVIS_PYTHON_VERSION | tr -d .; fi) + - tox -e $(tox -l | grep $TOX_PYTHON_VERSION | paste -sd "," -) after_success: - coveralls + - coveralls sudo: false diff --git a/AUTHORS b/AUTHORS index b914557..07d93cf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,2 +2,4 @@ Frank Tobia <frank.tobia@gmail.com> Sergei Chipiga <svchipiga@yandex-team.ru> Ben Greene <B.Greene@analyticsengines.com> +Adam Talsma <adam@talsma.ca> +Brian Maissy <brian.maissy@gmail.com> diff --git a/docs/source/index.rst b/docs/source/index.rst index 0f5d3da..35cd398 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,6 +16,12 @@ second-to-last) or relative (i.e. run this test before this other test). you read here isn't currently implemented, rest assured that I am working on it (or feel free to ping me: https://github.com/ftobia) +Supported python and pytest versions +------------------------------------ + +pytest-ordering supports python 2.7, 3.4, 3.5, 3.6, 3.7, and pypy, and is +compatible with pytest 3.6.0 or newer. + Quickstart ---------- diff --git a/pytest_ordering/__init__.py b/pytest_ordering/__init__.py index 0cca91d..c8eb64a 100644 --- a/pytest_ordering/__init__.py +++ b/pytest_ordering/__init__.py @@ -28,13 +28,23 @@ def pytest_configure(config): """Register the "run" marker.""" + provided_by_pytest_ordering = ( + 'Provided by pytest-ordering. ' + 'See also: http://pytest-ordering.readthedocs.org/' + ) + config_line = ( 'run: specify ordering information for when tests should run ' - 'in relation to one another. Provided by pytest-ordering. ' - 'See also: http://pytest-ordering.readthedocs.org/' + 'in relation to one another. ' + provided_by_pytest_ordering ) config.addinivalue_line('markers', config_line) + for mark_name in orders_map.keys(): + config_line = '{}: run test {}. {}'.format(mark_name, + mark_name.replace('_', ' '), + provided_by_pytest_ordering) + config.addinivalue_line('markers', config_line) + def pytest_collection_modifyitems(session, config, items): grouped_items = {} diff --git a/setup.py b/setup.py index fa080b0..4b43407 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ 'pytest_ordering = pytest_ordering', ] }, - install_requires=['pytest'], + install_requires=['pytest>=3.6'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', @@ -37,11 +37,12 @@ 'Topic :: Utilities', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: Implementation :: PyPy', ], ) diff --git a/tests/test_ordering.py b/tests/test_ordering.py index 12f4689..dd703ab 100644 --- a/tests/test_ordering.py +++ b/tests/test_ordering.py @@ -268,7 +268,10 @@ def test_5(self): pass assert item_names_for(tests_content) == ['test_3', 'test_4', 'test_5', 'test_1', 'test_2'] -def test_run_marker_registered(capsys): - pytest.main('--markers') +def test_markers_registered(capsys): + pytest.main(['--markers']) out, err = capsys.readouterr() assert '@pytest.mark.run' in out + assert '@pytest.mark.first' in out + assert '@pytest.mark.last' in out + assert out.count('Provided by pytest-ordering') == 17 diff --git a/tox.ini b/tox.ini index 0e41cf6..c68f8fa 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,20 @@ # content of: tox.ini, put in same dir as setup.py [tox] -envlist = py26,py27,py33,py34,py35,pypy +envlist = {py27,py34,py35,py36,py37,pypy}-pytest{36,37,38,39,310,40,41,42,43,44,45} [testenv] -deps=pytest +deps = + pytest36: pytest>=3.6,<3.7 + pytest37: pytest>=3.7,<3.8 + pytest38: pytest>=3.8,<3.9 + pytest39: pytest>=3.9,<3.10 + pytest310: pytest>=3.10,<3.11 + pytest40: pytest>=4.0,<4.1 + pytest41: pytest>=4.1,<4.2 + pytest42: pytest>=4.2,<4.3 + pytest43: pytest>=4.3,<4.4 + pytest44: pytest>=4.4,<4.5 + pytest45: pytest>=4.5,<4.6 pytest-cov -commands= +commands = coverage run --source=pytest_ordering -m py.test tests coverage report -m --fail-under=95
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor