I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-domdf-python-tools-3.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-domdf-python-tools-3.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
Test session started at 13:27:29
rootdir: /home/tkloczko/rpmbuild/BUILD/domdf_python_tools-3.3.0, configfile: tox.ini
plugins: datadir-1.3.1, regressions-2.3.1, timeout-2.1.0, Faker-14.1.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 18185 items
tests/test_bases.py ................................................ [ 0%]
tests/test_compat.py . [ 0%]
tests/test_dates.py ...X................................................................... [ 0%]
tests/test_delegators.py ... [ 0%]
tests/test_dir_comparator.py ....... [ 0%]
tests/test_docstrings.py ....... [ 0%]
tests/test_doctools.py ....................s. [ 0%]
tests/test_getters.py ........................ [ 1%]
tests/test_import_tools.py ............FFFsss.sssssss.sssssss.sssssss.sssssss.sssssss.sssssss.sssssss.ssss [ 1%]
tests/test_iterative.py .............................................. [ 1%]
tests/test_namedlist.py ............................................................................................................................................ [ 2%]
...... [ 2%]
tests/test_paths.py ...........sssss.............................................................................................................. [ 3%]
tests/test_paths_stdlib.py ........s...s........s................... [ 3%]
tests/test_pretty_print.py ............................................................... [ 3%]
tests/test_secrets.py .............................................................................................................................................. [ 4%]
.................................................................................................................................................................... [ 5%]
.................................................................................................................................................................... [ 6%]
.................................................................................................................................................................... [ 7%]
.................................................................................................................................................................... [ 8%]
.................................................................................................................................................................... [ 9%]
.................................................................................................................................................................... [ 9%]
.................................................................................................................................................................... [ 10%]
.................................................................................................................................................................... [ 11%]
.................................................................................................................................................................... [ 12%]
.................................................................................................................................................................... [ 13%]
.................................................................................................................................................................... [ 14%]
.................................................................................................................................................................... [ 15%]
.................................................................................................................................................................... [ 16%]
.................................................................................................................................................................... [ 17%]
.................................................................................................................................................................... [ 18%]
.................................................................................................................................................................... [ 18%]
.................................................................................................................................................................... [ 19%]
.................................................................................................................................................................... [ 20%]
.................................................................................................................................................................... [ 21%]
.................................................................................................................................................................... [ 22%]
.................................................................................................................................................................... [ 23%]
.................................................................................................................................................................... [ 24%]
.................................................................................................................................................................... [ 25%]
.................................................................................................................................................................... [ 26%]
.................................................................................................................................................................... [ 27%]
.................................................................................................................................................................... [ 27%]
.................................................................................................................................................................... [ 28%]
.................................................................................................................................................................... [ 29%]
.................................................................................................................................................................... [ 30%]
.................................................................................................................................................................... [ 31%]
.................................................................................................................................................................... [ 32%]
.................................................................................................................................................................... [ 33%]
.................................................................................................................................................................... [ 34%]
.................................................................................................................................................................... [ 35%]
.................................................................................................................................................................... [ 36%]
.................................................................................................................................................................... [ 37%]
.................................................................................................................................................................... [ 37%]
.................................................................................................................................................................... [ 38%]
.................................................................................................................................................................... [ 39%]
.................................................................................................................................................................... [ 40%]
.................................................................................................................................................................... [ 41%]
.................................................................................................................................................................... [ 42%]
.................................................................................................................................................................... [ 43%]
.................................................................................................................................................................... [ 44%]
.................................................................................................................................................................... [ 45%]
.................................................................................................................................................................... [ 46%]
.................................................................................................................................................................... [ 46%]
.................................................................................................................................................................... [ 47%]
.................................................................................................................................................................... [ 48%]
.................................................................................................................................................................... [ 49%]
.................................................................................................................................................................... [ 50%]
.................................................................................................................................................................... [ 51%]
.................................................................................................................................................................... [ 52%]
.................................................................................................................................................................... [ 53%]
.................................................................................................................................................................... [ 54%]
.................................................................................................................................................................... [ 55%]
.................................................................................................................................................................... [ 55%]
.................................................................................................................................................................... [ 56%]
.................................................................................................................................................................... [ 57%]
............................................................................ [ 58%]
tests/test_stringlist.py .........................x....................... [ 58%]
tests/test_terminal.py .s.... [ 58%]
tests/test_typing.py .......................................... [ 58%]
tests/test_userlist.py ............................................................................................................................................. [ 59%]
.... [ 59%]
tests/test_utils.py .................................................................................................................................... [ 60%]
tests/test_versions.py ............................................................................................................................................. [ 61%]
........................................................................................................................................ [ 61%]
tests/test_words.py .............................................. [ 62%]
tests/test_pagesizes/test_pagesizes.py ................................................................................................ [ 62%]
tests/test_pagesizes/test_units.py ................................................................................................................................. [ 63%]
.................................................................................................................................................................... [ 64%]
.................................................................................................................................................................... [ 65%]
.................................................................................................................................................................... [ 65%]
.................................................................................................................................................................... [ 66%]
.................................................................................................................................................................... [ 67%]
.................................................................................................................................................................... [ 68%]
.................................................................................................................................................................... [ 69%]
.................................................................................................................................................................... [ 70%]
.................................................................................................................................................................... [ 71%]
.................................................................................................................................................................... [ 72%]
.................................................................................................................................................................... [ 73%]
.................................................................................................................................................................... [ 74%]
.................................................................................................................................................................... [ 74%]
.................................................................................................................................................................... [ 75%]
.................................................................................................................................................................... [ 76%]
.................................................................................................................................................................... [ 77%]
.................................................................................................................................................................... [ 78%]
.................................................................................................................................................................... [ 79%]
.................................................................................................................................................................... [ 80%]
.................................................................................................................................................................... [ 81%]
.................................................................................................................................................................... [ 82%]
.................................................................................................................................................................... [ 83%]
.................................................................................................................................................................... [ 83%]
.................................................................................................................................................................... [ 84%]
.................................................................................................................................................................... [ 85%]
.................................................................................................................................................................... [ 86%]
.................................................................................................................................................................... [ 87%]
.................................................................................................................................................................... [ 88%]
.................................................................................................................................................................... [ 89%]
.................................................................................................................................................................... [ 90%]
.................................................................................................................................................................... [ 91%]
.................................................................................................................................................................... [ 92%]
.................................................................................................................................................................... [ 92%]
.................................................................................................................................................................... [ 93%]
.................................................................................................................................................................... [ 94%]
.................................................................................................................................................................... [ 95%]
.................................................................................................................................................................... [ 96%]
.................................................................................................................................................................... [ 97%]
.................................................................................................................................................................... [ 98%]
.................................................................................................................................................................... [ 99%]
............................................................................................................................. [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________________ test_discover_entry_points ________________________________________________________________________
advanced_data_regression =
def test_discover_entry_points(advanced_data_regression: AdvancedDataRegressionFixture):
entry_points = discover_entry_points("flake8.extension", lambda f: f.__name__.startswith("break"))
> advanced_data_regression.check([f.__name__ for f in entry_points])
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points0/test_import_tools_/test_discover_entry_points.yml
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points0/test_import_tools_/test_discover_entry_points.obtained.yml
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points0/test_import_tools_/test_discover_entry_points.obtained.diff.html
E ---
E +++
E @@ -1,2 +1 @@
E -- break_after_binary_operator
E -- break_before_binary_operator
E +[]
tests/test_import_tools.py:110: AssertionError
___________________________________________________________ test_discover_entry_points_by_name_object_match_func ___________________________________________________________
advanced_data_regression =
def test_discover_entry_points_by_name_object_match_func(advanced_data_regression: AdvancedDataRegressionFixture):
entry_points = discover_entry_points_by_name(
"flake8.extension", object_match_func=lambda f: f.__name__.startswith("break")
)
> advanced_data_regression.check({k: v.__name__ for k, v in entry_points.items()})
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_0/test_import_tools_/test_discover_entry_points_by_name_object_match_func.yml
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_0/test_import_tools_/test_discover_entry_points_by_name_object_match_func.obtained.yml
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_0/test_import_tools_/test_discover_entry_points_by_name_object_match_func.obtained.diff.html
E ---
E +++
E @@ -1,2 +1 @@
E -pycodestyle.break_after_binary_operator: break_after_binary_operator
E -pycodestyle.break_before_binary_operator: break_before_binary_operator
E +{}
tests/test_import_tools.py:117: AssertionError
____________________________________________________________ test_discover_entry_points_by_name_name_match_func ____________________________________________________________
advanced_data_regression =
def test_discover_entry_points_by_name_name_match_func(advanced_data_regression: AdvancedDataRegressionFixture):
entry_points = discover_entry_points_by_name(
"flake8.extension", name_match_func=lambda n: n.startswith("pycodestyle.")
)
> advanced_data_regression.check({k: v.__name__ for k, v in entry_points.items()})
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_1/test_import_tools_/test_discover_entry_points_by_name_name_match_func.yml
E /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_1/test_import_tools_/test_discover_entry_points_by_name_name_match_func.obtained.yml
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-8/test_discover_entry_points_by_1/test_import_tools_/test_discover_entry_points_by_name_name_match_func.obtained.diff.html
E ---
E +++
E @@ -1,36 +1 @@
E -pycodestyle.ambiguous_identifier: ambiguous_identifier
E -pycodestyle.bare_except: bare_except
E -pycodestyle.blank_lines: blank_lines
E -pycodestyle.break_after_binary_operator: break_after_binary_operator
E -pycodestyle.break_before_binary_operator: break_before_binary_operator
E -pycodestyle.comparison_negative: comparison_negative
E -pycodestyle.comparison_to_singleton: comparison_to_singleton
E -pycodestyle.comparison_type: comparison_type
E -pycodestyle.compound_statements: compound_statements
E -pycodestyle.continued_indentation: continued_indentation
E -pycodestyle.explicit_line_join: explicit_line_join
E -pycodestyle.extraneous_whitespace: extraneous_whitespace
E -pycodestyle.imports_on_separate_lines: imports_on_separate_lines
E -pycodestyle.indentation: indentation
E -pycodestyle.maximum_doc_length: maximum_doc_length
E -pycodestyle.maximum_line_length: maximum_line_length
E -pycodestyle.missing_whitespace: missing_whitespace
E -pycodestyle.missing_whitespace_after_import_keyword: missing_whitespace_after_import_keyword
E -pycodestyle.missing_whitespace_around_operator: missing_whitespace_around_operator
E -pycodestyle.module_imports_on_top_of_file: module_imports_on_top_of_file
E -pycodestyle.python_3000_async_await_keywords: python_3000_async_await_keywords
E -pycodestyle.python_3000_backticks: python_3000_backticks
E -pycodestyle.python_3000_has_key: python_3000_has_key
E -pycodestyle.python_3000_invalid_escape_sequence: python_3000_invalid_escape_sequence
E -pycodestyle.python_3000_not_equal: python_3000_not_equal
E -pycodestyle.python_3000_raise_comma: python_3000_raise_comma
E -pycodestyle.tabs_obsolete: tabs_obsolete
E -pycodestyle.tabs_or_spaces: tabs_or_spaces
E -pycodestyle.trailing_blank_lines: trailing_blank_lines
E -pycodestyle.trailing_whitespace: trailing_whitespace
E -pycodestyle.whitespace_around_comma: whitespace_around_comma
E -pycodestyle.whitespace_around_keywords: whitespace_around_keywords
E -pycodestyle.whitespace_around_named_parameter_equals: whitespace_around_named_parameter_equals
E -pycodestyle.whitespace_around_operator: whitespace_around_operator
E -pycodestyle.whitespace_before_comment: whitespace_before_comment
E -pycodestyle.whitespace_before_parameters: whitespace_before_parameters
E +{}
tests/test_import_tools.py:124: AssertionError
=========================================================================== slowest 25 durations ===========================================================================
0.35s teardown tests/test_pagesizes/test_units.py::TestSub::test_rsub_number[990-]
0.28s call tests/test_utils.py::TestHead::test_protocol_pandas
0.26s call tests/test_dates.py::test_converting_timezone
0.15s call tests/test_pagesizes/test_units.py::TestMul::test_pow_errors[440]
0.13s call tests/test_dates.py::test_set_timezone
0.11s setup tests/test_secrets.py::test_secret[jeremy]
0.09s setup tests/test_secrets.py::test_secret[awards]
0.05s call tests/test_dates.py::test_utc_timestamp_to_datetime
0.02s call tests/test_pretty_print.py::TestFancyPrinter::test_str_wrap
0.02s call tests/test_words.py::test_get_words_list
0.02s call tests/test_dates.py::test_check_date
0.02s setup tests/test_bases.py::TestDictable::test_creation
0.02s call tests/test_paths.py::test_stream
0.02s call tests/test_paths.py::test_iterchildren_match[True]
0.01s call tests/test_dates.py::test_utc_offset
0.01s call tests/test_paths.py::test_iterchildren_match[False]
0.01s call tests/test_import_tools.py::test_discover_entry_points
0.01s call tests/test_paths.py::test_iterchildren_exclusions
0.01s call tests/test_import_tools.py::test_iter_submodules[domdf_python_tools-3.8]
0.01s call tests/test_docstrings.py::test_docstrings[domdf_python_tools.pagesizes.units]
0.01s call tests/test_import_tools.py::test_discover_entry_points_by_name_name_match_func
0.01s call tests/test_pretty_print.py::TestFancyPrinter::test_compact_width
0.01s call tests/test_import_tools.py::test_discover_entry_points_by_name_object_match_func
0.01s setup tests/test_import_tools.py::test_discover_entry_points
0.01s setup tests/test_import_tools.py::test_iter_submodules[importlib-3.8]
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_doctools.py:500: Not needed after Python v3.7.0.
SKIPPED [8] tests/test_import_tools.py:127: Output differs on Python 3.6
SKIPPED [16] tests/test_import_tools.py:127: Output differs on Python 3.7
SKIPPED [8] tests/test_import_tools.py:127: Output differs on PyPy 3.8
SKIPPED [16] tests/test_import_tools.py:127: Output differs on Python 3.9
SKIPPED [8] tests/test_import_tools.py:127: Output differs on Python 3.10
SKIPPED [5] tests/test_paths.py:181: Windows uses a different path structure.
SKIPPED [1] tests/test_paths_stdlib.py:224: group 1000 doesn't have an entry in the system database
SKIPPED [1] tests/test_paths_stdlib.py:255: os.link() is present
SKIPPED [1] tests/test_paths_stdlib.py:389: test requires a Windows-compatible system
SKIPPED [1] tests/test_terminal.py:45: Different test used for POSIX
XFAIL tests/test_stringlist.py::TestStringList::test_pickle
XPASS tests/test_dates.py::test_set_timezone
FAILED tests/test_import_tools.py::test_discover_entry_points - AssertionError: FILES DIFFER:
FAILED tests/test_import_tools.py::test_discover_entry_points_by_name_object_match_func - AssertionError: FILES DIFFER:
FAILED tests/test_import_tools.py::test_discover_entry_points_by_name_name_match_func - AssertionError: FILES DIFFER:
==================================================== 3 failed, 18114 passed, 66 skipped, 1 xfailed, 1 xpassed in 25.39s ====================================================
```
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output:
Here is list of installed modules in build env