Marcel Telka
2024-03-31 fe6eb26aea0379562a320c06dbc6a02592af0d7c
python/pytest-relaxed: update to 2.0.2

7 files modified
183 ■■■■■ changed files
components/python/pytest-relaxed/Makefile 14 ●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/manifests/sample-manifest.p5m 2 ●●● patch | view | raw | blame | history
components/python/pytest-relaxed/patches/01-test-disable-pytest-plugins.patch 8 ●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/patches/02-PytestDeprecationWarning.patch 4 ●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/pkg5 6 ●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/python-integrate-project.conf 10 ●●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/test/results-all.master 139 ●●●●● patch | view | raw | blame | history
components/python/pytest-relaxed/Makefile
@@ -19,14 +19,13 @@
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME =        pytest-relaxed
HUMAN_VERSION =            2.0.1
COMPONENT_REVISION =        1
HUMAN_VERSION =            2.0.2
COMPONENT_SUMMARY =        pytest-relaxed - Relaxed test discovery/organization for pytest
COMPONENT_PROJECT_URL =        https://pytest-relaxed.readthedocs.io/
COMPONENT_ARCHIVE_URL =        \
    https://github.com/bitprophet/pytest-relaxed/archive/refs/tags/$(HUMAN_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH =    \
    sha256:caf4a7da34e922c0cd26fbf37b9aca1bc099a02668bcf83ebf6fe6717687e844
    sha256:aba10bf2dd25ef25b0a6e116e5ee10e43852fe285f66a4092984c87cbfcf5b18
COMPONENT_LICENSE =        BSD-2-Clause
COMPONENT_LICENSE_FILE =    LICENSE
@@ -34,6 +33,15 @@
include $(WS_MAKE_RULES)/common.mk
# https://github.com/pytest-dev/pluggy/issues/457
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-checkdocs
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-console-scripts
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-enabler
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-randomly
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-salt-factories
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-system-statistics
TEST_CONFLICTING_PACKAGES.python += library/python/typeguard
# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/decorator
PYTHON_REQUIRED_PACKAGES += library/python/pytest
components/python/pytest-relaxed/manifests/sample-manifest.p5m
@@ -10,7 +10,7 @@
#
#
# Copyright 2023 <contributor>
# Copyright 2024 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
components/python/pytest-relaxed/patches/01-test-disable-pytest-plugins.patch
@@ -1,7 +1,7 @@
Some pytest plugins needs to be disabled because they produce unexpected output.
--- pytest-relaxed-2.0.1/tests/test_collection.py.orig
+++ pytest-relaxed-2.0.1/tests/test_collection.py
--- pytest-relaxed-2.0.2/tests/test_collection.py.orig
+++ pytest-relaxed-2.0.2/tests/test_collection.py
@@ -41,7 +41,7 @@
         """
         )
@@ -143,8 +143,8 @@
         )
-        assert testdir.runpytest().ret is ExitCode.OK
+        assert testdir.runpytest("-p", "no:black").ret is ExitCode.OK
--- pytest-relaxed-2.0.1/tests/test_display.py.orig
+++ pytest-relaxed-2.0.1/tests/test_display.py
--- pytest-relaxed-2.0.2/tests/test_display.py.orig
+++ pytest-relaxed-2.0.2/tests/test_display.py
@@ -10,7 +10,7 @@
 
 
components/python/pytest-relaxed/patches/02-PytestDeprecationWarning.patch
@@ -1,7 +1,7 @@
https://github.com/bitprophet/pytest-relaxed/issues/28
--- pytest-relaxed-2.0.1/pytest_relaxed/plugin.py.orig
+++ pytest-relaxed-2.0.1/pytest_relaxed/plugin.py
--- pytest-relaxed-2.0.2/pytest_relaxed/plugin.py.orig
+++ pytest-relaxed-2.0.2/pytest_relaxed/plugin.py
@@ -37,7 +37,7 @@
     return SpecModule.from_parent(parent=parent, path=file_path)
 
components/python/pytest-relaxed/pkg5
@@ -5,8 +5,8 @@
        "runtime/python-39"
    ],
    "fmris": [
        "library/python/pytest-relaxed-39",
        "library/python/pytest-relaxed"
        "library/python/pytest-relaxed",
        "library/python/pytest-relaxed-39"
    ],
    "name": "pytest-relaxed"
}
}
components/python/pytest-relaxed/python-integrate-project.conf
@@ -19,3 +19,13 @@
%hook-begin%
# https://github.com/bitprophet/pytest-relaxed/issues/27
DOWNLOAD_URL='https://github.com/bitprophet/pytest-relaxed/archive/refs/tags/$(HUMAN_VERSION).tar.gz'
%include-3%
# https://github.com/pytest-dev/pluggy/issues/457
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-checkdocs
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-console-scripts
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-enabler
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-randomly
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-salt-factories
TEST_CONFLICTING_PACKAGES.python += library/python/pytest-system-statistics
TEST_CONFLICTING_PACKAGES.python += library/python/typeguard
components/python/pytest-relaxed/test/results-all.master
@@ -6,108 +6,61 @@
testpaths: tests
collecting ... collected 34 items
tests/test_collection.py::TestRelaxedMixin::test_selects_all_non_underscored_members PASSED
tests/test_collection.py::TestRelaxedMixin::test_setup_given_inner_class_instances_when_inherited PASSED
tests/test_collection.py::TestRelaxedMixin::test_setup_method_given_inner_class_instances PASSED
tests/test_collection.py::TestRelaxedMixin::test_skips_pytest_fixtures PASSED
tests/test_collection.py::TestRelaxedMixin::test_skips_setup_and_teardown PASSED
tests/test_collection.py::TestSpecClass::test_methods_self_objects_exhibit_class_attributes PASSED
tests/test_collection.py::TestSpecClass::test_module_contents_are_not_copied_into_top_level_classes PASSED
tests/test_collection.py::TestSpecClass::test_nested_self_objects_exhibit_parent_attributes PASSED
tests/test_collection.py::TestSpecClass::test_nesting_is_infinite PASSED
tests/test_collection.py::TestSpecClass::test_normal_methods_from_outer_classes_are_not_copied PASSED
tests/test_collection.py::TestSpecClass::test_overriding_works_naturally PASSED
tests/test_collection.py::TestSpecClass::test_private_methods_from_outer_classes_are_copied PASSED
tests/test_collection.py::TestSpecModule::test_correctly_handles_marked_test_cases SKIPPED
tests/test_collection.py::TestSpecModule::test_does_not_collect_test_prefixed_files PASSED
tests/test_collection.py::TestSpecModule::test_does_not_warn_about_imported_names PASSED
tests/test_collection.py::TestSpecModule::test_replaces_class_tests_with_custom_recursing_classes PASSED
tests/test_collection.py::TestSpecModule::test_skips_imported_objects PASSED
tests/test_collection.py::TestSpecModule::test_skips_non_callable_items PASSED
tests/test_collection.py::Test_pytest_collect_file::test_does_not_consume_conftest_files PASSED
tests/test_collection.py::Test_pytest_collect_file::test_only_loads_dot_py_files PASSED
tests/test_collection.py::Test_pytest_collect_file::test_skips_underscored_directories PASSED
tests/test_collection.py::Test_pytest_collect_file::test_skips_underscored_files PASSED
tests/test_display.py::TestRegularFunctions::test_acts_just_like_normal_pytest PASSED
tests/test_display.py::TestVerboseClasses::test_headers_and_tests_have_underscores_turn_to_spaces PASSED
tests/test_display.py::TestVerboseClasses::test_nests_many_levels_deep_no_problem PASSED
tests/test_display.py::TestVerboseClasses::test_shows_tests_nested_under_classes_without_files PASSED
tests/test_display.py::TestVerboseClasses::test_test_prefixes_are_stripped PASSED
tests/test_display.py::TestVerboseClasses::test_test_suffixes_are_stripped PASSED
tests/test_display.py::TestVerboseClasses::test_tests_are_colorized_by_test_result PASSED
tests/test_display.py::TestVerboseFunctions::test_displays_tests_indented_under_module_header SKIPPED
tests/test_display.py::TestVerboseFunctions::test_test_prefixes_are_stripped PASSED
tests/test_raises.py::Test_raises::test_when_given_exception_not_raised_it_raises_Exception PASSED
tests/test_raises.py::Test_raises::test_when_given_exception_raised_no_problem PASSED
tests/test_raises.py::Test_raises::test_when_some_other_exception_raised_it_is_untouched PASSED
 pytest collect file
=============================== warnings summary ===============================
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pytest_reporter/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import get_distribution, DistributionNotFound
    only loads dot py files
    skips underscored files
    skips underscored directories
    does not consume conftest files
tests/test_collection.py: 42 warnings
tests/test_display.py: 10 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('paste')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
RelaxedMixin
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('flufl')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
    selects all non underscored members
    skips setup and teardown
    skips pytest fixtures
    setup given inner class instances when inherited
    setup method given inner class instances
tests/test_collection.py: 42 warnings
tests/test_display.py: 10 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('repoze')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
SpecModule
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('repoze.sphinx')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
    skips non callable items
    skips imported objects
    does not warn about imported names
    replaces class tests with custom recursing classes
    does not collect test prefixed files
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2350: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('repoze')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(parent)
SpecClass
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
    methods self objects exhibit class attributes
    nested self objects exhibit parent attributes
    nesting is infinite
    overriding works naturally
    normal methods from outer classes are not copied
    private methods from outer classes are copied
    module contents are not copied into top level classes
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zc')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
RegularFunctions
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zest')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
    acts just like normal pytest
tests/test_collection.py: 315 warnings
tests/test_display.py: 75 warnings
  $(PYTHON_DIR)/vendor-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
VerboseFunctions
tests/test_collection.py: 21 warnings
tests/test_display.py: 5 warnings
  $(PYTHON_DIR)/vendor-packages/pytest_tempdir/plugin.py:150: PytestDeprecationWarning: The hookimpl pytest_tempdir_temproot uses old-style configuration options (marks or attributes).
  Please use the pytest.hookimpl(trylast=True) decorator instead
   to configure the hooks.
   See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
    @pytest.mark.trylast
    displays tests indented under module header
    test prefixes are stripped
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======== 32 passed, 2 skipped, 702 warnings ========
VerboseClasses
    shows tests nested under classes without files
    tests are colorized by test result
    nests many levels deep no problem
    headers and tests have underscores turn to spaces
    test prefixes are stripped
    test suffixes are stripped
 raises
    when given exception raised no problem
    when given exception not raised it raises Exception
    when some other exception raised it is untouched
======== 32 passed, 2 skipped ========