diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pytest-ordering/files | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pytest-ordering/files')
| -rw-r--r-- | dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch | 21 | ||||
| -rw-r--r-- | dev-python/pytest-ordering/files/pytest-ordering-0.6-marks.patch | 56 |
2 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch new file mode 100644 index 000000000000..3a3ea15f4b8e --- /dev/null +++ b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch @@ -0,0 +1,21 @@ +From 9bfb05700386254afabb38f762e0ea860b567209 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Tue, 26 Jan 2021 20:42:14 +0100 +Subject: [PATCH] Don't use accidental pytest API, fix tests for pytest 6.2+ + +https://github.com/ftobia/pytest-ordering/pull/76 + +--- a/tests/test_ordering.py ++++ b/tests/test_ordering.py +@@ -12,9 +12,9 @@ def item_names_for(testdir): + def _item_names_for(tests_content): + # some strange code to extract sorted items + items = testdir.getitems(tests_content) +- hook = testdir.config.hook ++ hook = items[0].config.hook + hook.pytest_collection_modifyitems(session=items[0].session, +- config=testdir.config, items=items) ++ config=items[0].config, items=items) + return [item.name for item in items] + + return _item_names_for diff --git a/dev-python/pytest-ordering/files/pytest-ordering-0.6-marks.patch b/dev-python/pytest-ordering/files/pytest-ordering-0.6-marks.patch new file mode 100644 index 000000000000..16712166325c --- /dev/null +++ b/dev-python/pytest-ordering/files/pytest-ordering-0.6-marks.patch @@ -0,0 +1,56 @@ +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 + +minimized from: +https://github.com/ftobia/pytest-ordering/commit/6de05faa7d399a3f0f99b33b75747d39adb1f535 + +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/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 |
