HypothesisWorks / hypothesis

Hypothesis is a powerful, flexible, and easy to use library for property-based testing.
https://hypothesis.works
Other
7.56k stars 587 forks source link

6.40.0: pytest is failing in `tests/pytest/test_fixtures.py::test_given_plus_overridden_fixture` unit #3276

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

I'm trying to package 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.

Here is pytest output in which are some call traces and warnings:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hypothesis-6.40.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hypothesis-6.40.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -p no:randomly -p no:twisted -p no:trio tests -k '
        not test_should_have_correct_ordering and       not test_can_disallow_prefixes and      not test_can_generate_non_utc and       not test_can_generate_prefixes_if_allowed_and_available and         not test_datetimes_stay_within_naive_bounds and         not test_utc_is_minimal'
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/hypothesis-hypothesis-python-6.40.0, configfile: pytest.ini
plugins: hypothesis-6.40.0, asyncio-0.18.2, timeout-2.1.0, forked-1.4.0, xdist-2.5.0
asyncio: mode=legacy
collected 4994 items / 12 deselected / 4982 selected

tests/array_api/test_argument_validation.py ........................................................................................                                 [  1%]
tests/array_api/test_arrays.py ..............................................xx..............s                                                                       [  3%]
tests/array_api/test_from_dtype.py ..............................................ssssss                                                                              [  4%]
tests/array_api/test_indices.py .......                                                                                                                              [  4%]
tests/array_api/test_partial_adoptors.py ..............                                                                                                              [  4%]
tests/array_api/test_pretty.py ..........................                                                                                                            [  5%]
tests/array_api/test_scalar_dtypes.py ..........                                                                                                                     [  5%]
tests/codemods/test_codemod_cli.py ...                                                                                                                               [  5%]
tests/codemods/test_codemods.py .........                                                                                                                            [  5%]
tests/conjecture/test_choice_tree.py ..........                                                                                                                      [  5%]
tests/conjecture/test_data_tree.py ............................                                                                                                      [  6%]
tests/conjecture/test_dfa.py ........................                                                                                                                [  6%]
tests/conjecture/test_engine.py ..........................................................................................................................           [  9%]
tests/conjecture/test_float_encoding.py ..............................................................................................                               [ 11%]
tests/conjecture/test_intlist.py .....                                                                                                                               [ 11%]
tests/conjecture/test_junkdrawer.py .....................                                                                                                            [ 11%]
tests/conjecture/test_lstar.py ............                                                                                                                          [ 11%]
tests/conjecture/test_minimizer.py .......                                                                                                                           [ 11%]
tests/conjecture/test_optimiser.py ..............                                                                                                                    [ 12%]
tests/conjecture/test_order_shrinking.py ....                                                                                                                        [ 12%]
tests/conjecture/test_pareto.py .........                                                                                                                            [ 12%]
tests/conjecture/test_shrinker.py ..................................                                                                                                 [ 13%]
tests/conjecture/test_shrinking_dfas.py ..........                                                                                                                   [ 13%]
tests/conjecture/test_shrinking_interface.py ...                                                                                                                     [ 13%]
tests/conjecture/test_test_data.py ...........................................                                                                                       [ 14%]
tests/conjecture/test_utils.py .....................................                                                                                                 [ 15%]
tests/cover/test_annotations.py ..................                                                                                                                   [ 15%]
tests/cover/test_arbitrary_data.py ..........                                                                                                                        [ 15%]
tests/cover/test_async_def.py .                                                                                                                                      [ 15%]
tests/cover/test_asyncio.py ..                                                                                                                                       [ 15%]
tests/cover/test_attrs_inference.py .....                                                                                                                            [ 15%]
tests/cover/test_cache_implementation.py .....................                                                                                                       [ 16%]
tests/cover/test_caching.py .......                                                                                                                                  [ 16%]
tests/cover/test_cathetus.py ......................................................................                                                                  [ 17%]
tests/cover/test_charmap.py .................                                                                                                                        [ 18%]
tests/cover/test_compat.py .................                                                                                                                         [ 18%]
tests/cover/test_complex_numbers.py ..............                                                                                                                   [ 18%]
tests/cover/test_composite.py .............                                                                                                                          [ 18%]
tests/cover/test_composite_kwonlyargs.py .                                                                                                                           [ 18%]
tests/cover/test_control.py ...............                                                                                                                          [ 19%]
tests/cover/test_core.py .........                                                                                                                                   [ 19%]
tests/cover/test_custom_reprs.py ......                                                                                                                              [ 19%]
tests/cover/test_database_backend.py ........................                                                                                                        [ 20%]
tests/cover/test_datetimes.py ......................................                                                                                                 [ 20%]
tests/cover/test_deadline.py ............                                                                                                                            [ 21%]
tests/cover/test_debug_information.py .                                                                                                                              [ 21%]
tests/cover/test_deferred_strategies.py .................                                                                                                            [ 21%]
tests/cover/test_detection.py .....                                                                                                                                  [ 21%]
tests/cover/test_direct_strategies.py .............................................................................................................................. [ 24%]
................................................................................................................................                                     [ 26%]
tests/cover/test_draw_example.py ..........................................................................................                                          [ 28%]
tests/cover/test_error_in_draw.py .                                                                                                                                  [ 28%]
tests/cover/test_escalation.py ......                                                                                                                                [ 28%]
tests/cover/test_example.py .........                                                                                                                                [ 28%]
tests/cover/test_executors.py ......                                                                                                                                 [ 28%]
tests/cover/test_explicit_examples.py ...........................                                                                                                    [ 29%]
tests/cover/test_falsifying_example_output.py ...                                                                                                                    [ 29%]
tests/cover/test_feature_flags.py .......                                                                                                                            [ 29%]
tests/cover/test_filestorage.py ....                                                                                                                                 [ 29%]
tests/cover/test_filter_rewriting.py ..................................................................................                                              [ 31%]
tests/cover/test_filtered_strategy.py ....                                                                                                                           [ 31%]
tests/cover/test_find.py .                                                                                                                                           [ 31%]
tests/cover/test_flakiness.py ....                                                                                                                                   [ 31%]
tests/cover/test_float_nastiness.py ............................................................                                                                     [ 32%]
tests/cover/test_float_utils.py .......                                                                                                                              [ 32%]
tests/cover/test_functions.py ................                                                                                                                       [ 33%]
tests/cover/test_fuzz_one_input.py .............                                                                                                                     [ 33%]
tests/cover/test_given_error_conditions.py ........                                                                                                                  [ 33%]
tests/cover/test_health_checks.py .....................                                                                                                              [ 34%]
tests/cover/test_internal_helpers.py .                                                                                                                               [ 34%]
tests/cover/test_intervalset.py .......                                                                                                                              [ 34%]
tests/cover/test_lambda_formatting.py .....................                                                                                                          [ 34%]
tests/cover/test_lazy_import.py .                                                                                                                                    [ 34%]
tests/cover/test_lookup.py ......................................................................................................................................... [ 37%]
.................................................................................................................................................................... [ 40%]
................................................................................................................................................                     [ 43%]
tests/cover/test_lookup_py37.py xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                   [ 44%]
tests/cover/test_lookup_py38.py ..........x..x....                                                                                                                   [ 44%]
tests/cover/test_map.py ...                                                                                                                                          [ 44%]
tests/cover/test_mock.py ...                                                                                                                                         [ 44%]
tests/cover/test_nothing.py ............                                                                                                                             [ 44%]
tests/cover/test_numerics.py ...........................                                                                                                             [ 45%]
tests/cover/test_one_of.py .....                                                                                                                                     [ 45%]
tests/cover/test_permutations.py ....                                                                                                                                [ 45%]
tests/cover/test_phases.py .........                                                                                                                                 [ 45%]
tests/cover/test_posonly_args_py38.py ...                                                                                                                            [ 45%]
tests/cover/test_pretty.py ................................................                                                                                          [ 46%]
tests/cover/test_provisional_strategies.py .....................................................                                                                     [ 47%]
tests/cover/test_random_module.py ...........                                                                                                                        [ 48%]
tests/cover/test_randoms.py .............................................s......                                                                                     [ 49%]
tests/cover/test_recursive.py .......                                                                                                                                [ 49%]
tests/cover/test_reflection.py .........................................................................                                                             [ 50%]
tests/cover/test_regex.py .......................................................................................................................................... [ 53%]
..............................                                                                                                                                       [ 54%]
tests/cover/test_regressions.py .....                                                                                                                                [ 54%]
tests/cover/test_reporting.py ........                                                                                                                               [ 54%]
tests/cover/test_reproduce_failure.py ..............                                                                                                                 [ 54%]
tests/cover/test_runner_strategy.py .......                                                                                                                          [ 54%]
tests/cover/test_sampled_from.py ......................                                                                                                              [ 55%]
tests/cover/test_scrutineer.py .                                                                                                                                     [ 55%]
tests/cover/test_searchstrategy.py .........                                                                                                                         [ 55%]
tests/cover/test_seed_printing.py ..........                                                                                                                         [ 55%]
tests/cover/test_settings.py .................................................................                                                                       [ 57%]
tests/cover/test_setup_teardown.py ........                                                                                                                          [ 57%]
tests/cover/test_shrink_budgeting.py ...                                                                                                                             [ 57%]
tests/cover/test_simple_characters.py ...............                                                                                                                [ 57%]
tests/cover/test_simple_collections.py ....................................................................                                                          [ 58%]
tests/cover/test_simple_strings.py .................                                                                                                                 [ 59%]
tests/cover/test_slices.py .......................................................                                                                                   [ 60%]
tests/cover/test_slippage.py .............                                                                                                                           [ 60%]
tests/cover/test_stateful.py ......................................................................                                                                  [ 62%]
tests/cover/test_statistical_events.py .................                                                                                                             [ 62%]
tests/cover/test_subnormal_floats.py ...............s........                                                                                                        [ 62%]
tests/cover/test_targeting.py ...........                                                                                                                            [ 63%]
tests/cover/test_testdecorators.py .....................................................                                                                             [ 64%]
tests/cover/test_text.py .                                                                                                                                           [ 64%]
tests/cover/test_traceback_elision.py ..                                                                                                                             [ 64%]
tests/cover/test_type_lookup.py .................................................................................................................................... [ 66%]
.........                                                                                                                                                            [ 67%]
tests/cover/test_type_lookup_forward_ref.py ........                                                                                                                 [ 67%]
tests/cover/test_unicode_identifiers.py ....                                                                                                                         [ 67%]
tests/cover/test_unittest.py ....                                                                                                                                    [ 67%]
tests/cover/test_validation.py ....................................                                                                                                  [ 68%]
tests/cover/test_verbosity.py ........                                                                                                                               [ 68%]
tests/datetime/test_dateutil_timezones.py ..........                                                                                                                 [ 68%]
tests/datetime/test_pytz_timezones.py ..............                                                                                                                 [ 68%]
tests/datetime/test_zoneinfo_timezones.py ..                                                                                                                         [ 68%]
tests/ghostwriter/test_expected_output.py ...............................                                                                                            [ 69%]
tests/ghostwriter/test_ghostwriter.py ......................................................................................................                         [ 71%]
tests/ghostwriter/test_ghostwriter_cli.py ............                                                                                                               [ 71%]
tests/nocover/test_argument_validation.py ....................................................................................................................       [ 73%]
tests/nocover/test_bad_repr.py ...                                                                                                                                   [ 74%]
tests/nocover/test_baseexception.py ..................                                                                                                               [ 74%]
tests/nocover/test_boundary_exploration.py .                                                                                                                         [ 74%]
tests/nocover/test_build_signature.py ......                                                                                                                         [ 74%]
tests/nocover/test_cache_implementation.py .                                                                                                                         [ 74%]
tests/nocover/test_cacheable.py ..........                                                                                                                           [ 74%]
tests/nocover/test_characters.py ..                                                                                                                                  [ 74%]
tests/nocover/test_collective_minimization.py .............................................                                                                          [ 75%]
tests/nocover/test_compat.py .....                                                                                                                                   [ 75%]
tests/nocover/test_completion.py .                                                                                                                                   [ 75%]
tests/nocover/test_conjecture_engine.py ......                                                                                                                       [ 75%]
tests/nocover/test_conjecture_int_list.py .                                                                                                                          [ 75%]
tests/nocover/test_conjecture_utils.py ...                                                                                                                           [ 76%]
tests/nocover/test_conventions.py .                                                                                                                                  [ 76%]
tests/nocover/test_database_agreement.py .                                                                                                                           [ 76%]
tests/nocover/test_database_usage.py ......                                                                                                                          [ 76%]
tests/nocover/test_deferred_errors.py ......                                                                                                                         [ 76%]
tests/nocover/test_drypython_returns.py ....................................................                                                                         [ 77%]
tests/nocover/test_duplication.py ........                                                                                                                           [ 77%]
tests/nocover/test_dynamic_variable.py ..                                                                                                                            [ 77%]
tests/nocover/test_emails.py .                                                                                                                                       [ 77%]
tests/nocover/test_eval_as_source.py ...                                                                                                                             [ 77%]
tests/nocover/test_explore_arbitrary_languages.py .s                                                                                                                 [ 77%]
tests/nocover/test_fancy_repr.py ......                                                                                                                              [ 77%]
tests/nocover/test_filtering.py ..........                                                                                                                           [ 78%]
tests/nocover/test_find.py ......                                                                                                                                    [ 78%]
tests/nocover/test_fixtures.py .                                                                                                                                     [ 78%]
tests/nocover/test_flatmap.py ........................                                                                                                               [ 78%]
tests/nocover/test_floating.py .................                                                                                                                     [ 78%]
tests/nocover/test_from_type_recipe.py .                                                                                                                             [ 78%]
tests/nocover/test_given_error_conditions.py .                                                                                                                       [ 79%]
tests/nocover/test_given_reuse.py ...                                                                                                                                [ 79%]
tests/nocover/test_imports.py .                                                                                                                                      [ 79%]
tests/nocover/test_integer_ranges.py .......                                                                                                                         [ 79%]
tests/nocover/test_interesting_origin.py ...                                                                                                                         [ 79%]
tests/nocover/test_labels.py ......                                                                                                                                  [ 79%]
tests/nocover/test_large_examples.py .                                                                                                                               [ 79%]
tests/nocover/test_limits.py .                                                                                                                                       [ 79%]
tests/nocover/test_lstar.py .                                                                                                                                        [ 79%]
tests/nocover/test_modify_inner_test.py .......                                                                                                                      [ 79%]
tests/nocover/test_nesting.py .                                                                                                                                      [ 79%]
tests/nocover/test_pretty_repr.py ....                                                                                                                               [ 79%]
tests/nocover/test_randomization.py ..                                                                                                                               [ 79%]
tests/nocover/test_recursive.py ........                                                                                                                             [ 79%]
tests/nocover/test_regex.py ....                                                                                                                                     [ 79%]
tests/nocover/test_regressions.py ..                                                                                                                                 [ 80%]
tests/nocover/test_reusable_values.py ........                                                                                                                       [ 80%]
tests/nocover/test_sampled_from.py .........                                                                                                                         [ 80%]
tests/nocover/test_scrutineer.py ....                                                                                                                                [ 80%]
tests/nocover/test_sets.py ...                                                                                                                                       [ 80%]
tests/nocover/test_sharing.py .......                                                                                                                                [ 80%]
tests/nocover/test_simple_numbers.py ............................................................................................................................... [ 83%]
..........................................................                                                                                                           [ 84%]
tests/nocover/test_simple_strings.py .                                                                                                                               [ 84%]
tests/nocover/test_skipping.py ..                                                                                                                                    [ 84%]
tests/nocover/test_stateful.py ......                                                                                                                                [ 84%]
tests/nocover/test_strategy_state.py .                                                                                                                               [ 84%]
tests/nocover/test_subnormal_floats.py ..............                                                                                                                [ 84%]
tests/nocover/test_targeting.py ......                                                                                                                               [ 84%]
tests/nocover/test_testdecorators.py ...                                                                                                                             [ 84%]
tests/nocover/test_threading.py .                                                                                                                                    [ 84%]
tests/nocover/test_type_lookup_forward_ref.py ..                                                                                                                     [ 84%]
tests/nocover/test_unusual_settings_configs.py ..                                                                                                                    [ 84%]
tests/nocover/test_uuids.py .......                                                                                                                                  [ 85%]
tests/numpy/test_argument_validation.py ...............................................................................................................              [ 87%]
tests/numpy/test_deprecation.py ...                                                                                                                                  [ 87%]
tests/numpy/test_fill_values.py .....                                                                                                                                [ 87%]
tests/numpy/test_floor_ceil.py .........                                                                                                                             [ 87%]
tests/numpy/test_from_dtype.py ........................x............................                                                                                 [ 88%]
tests/numpy/test_gen_data.py ......................................................................................................                                  [ 90%]
tests/numpy/test_gufunc.py ...........................                                                                                                               [ 91%]
tests/numpy/test_import.py ..                                                                                                                                        [ 91%]
tests/numpy/test_narrow_floats.py ...............                                                                                                                    [ 91%]
tests/numpy/test_randomness.py .                                                                                                                                     [ 91%]
tests/numpy/test_sampled_from.py ..                                                                                                                                  [ 91%]
tests/pandas/test_argument_validation.py ...........................................                                                                                 [ 92%]
tests/pandas/test_data_frame.py .................ss                                                                                                                  [ 92%]
tests/pandas/test_indexes.py ........                                                                                                                                [ 93%]
tests/pandas/test_series.py .......                                                                                                                                  [ 93%]
tests/pytest/test_capture.py .....                                                                                                                                   [ 93%]
tests/pytest/test_checks.py .                                                                                                                                        [ 93%]
tests/pytest/test_compat.py ...                                                                                                                                      [ 93%]
tests/pytest/test_doctest.py .                                                                                                                                       [ 93%]
tests/pytest/test_fixtures.py ........F                                                                                                                              [ 93%]
tests/pytest/test_mark.py ..                                                                                                                                         [ 93%]
tests/pytest/test_parametrized_db_keys.py .                                                                                                                          [ 93%]
tests/pytest/test_profiles.py ...                                                                                                                                    [ 93%]
tests/pytest/test_pytest_detection.py ...                                                                                                                            [ 93%]
tests/pytest/test_reporting.py .                                                                                                                                     [ 93%]
tests/pytest/test_runs.py ..                                                                                                                                         [ 93%]
tests/pytest/test_seeding.py ....                                                                                                                                    [ 93%]
tests/pytest/test_skipping.py .                                                                                                                                      [ 93%]
tests/pytest/test_statistics.py .......                                                                                                                              [ 94%]
tests/quality/test_deferred_strategies.py ...                                                                                                                        [ 94%]
tests/quality/test_discovery_ability.py ................................................................................                                             [ 95%]
tests/quality/test_float_shrinking.py ........                                                                                                                       [ 95%]
tests/quality/test_integers.py .                                                                                                                                     [ 95%]
tests/quality/test_normalization.py ...................................                                                                                              [ 96%]
tests/quality/test_poisoned_lists.py ................................................                                                                                [ 97%]
tests/quality/test_poisoned_trees.py ......                                                                                                                          [ 97%]
tests/quality/test_shrink_quality.py ......................................................................                                                          [ 99%]
tests/quality/test_shrinking_order.py .                                                                                                                              [ 99%]
tests/quality/test_zig_zagging.py .                                                                                                                                  [ 99%]
tests/redis/test_redis_exampledatabase.py .....                                                                                                                      [ 99%]
tests/typing_extensions/test_backported_types.py .....................s....

================================================================================= FAILURES =================================================================================
____________________________________________________________________ test_given_plus_overridden_fixture ____________________________________________________________________
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/hypothesis-hypothesis-python-6.40.0/hypothesis-python/tests/pytest/test_fixtures.py", line 177, in test_given_plus_overridden_fixture
    testdir.runpytest(script, "-Werror").assert_outcomes(passed=1, failed=0)
  File "/usr/lib/python3.8/site-packages/_pytest/pytester.py", line 613, in assert_outcomes
    outcomes = self.parseoutcomes()
  File "/usr/lib/python3.8/site-packages/_pytest/pytester.py", line 567, in parseoutcomes
    return self.parse_summary_nouns(self.outlines)
  File "/usr/lib/python3.8/site-packages/_pytest/pytester.py", line 585, in parse_summary_nouns
    raise ValueError("Pytest terminal summary report not found")
ValueError: Pytest terminal summary report not found
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
running: /usr/bin/python3 -mpytest --basetemp=/tmp/pytest-of-tkloczko/pytest-70/test_given_plus_overridden_fixture0/runpytest-0 /tmp/pytest-of-tkloczko/pytest-70/test_given_plus_overridden_fixture0/test_given_plus_overridden_fixture.py -Werror --basetemp=/tmp/pytest-of-tkloczko/pytest-70/basetemp
     in: /tmp/pytest-of-tkloczko/pytest-70/test_given_plus_overridden_fixture0
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 264, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 995, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py", line 191, in pytest_configure
INTERNALERROR>     config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1342, in issue_config_time_warning
INTERNALERROR>     warnings.warn(warning, stacklevel=stacklevel)
INTERNALERROR> DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
============================================================================= warnings summary =============================================================================
../../../../../../usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191
  /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

../../../../../../usr/lib64/python3.8/importlib/__init__.py:127
  /usr/lib64/python3.8/importlib/__init__.py:127: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
    return _bootstrap._gcd_import(name[level:], package, level)

hypothesis-python/tests/cover/test_settings.py::test_note_deprecation_checks_date
  /usr/lib/python3.8/site-packages/_pytest/python.py:192: PytestRemovedIn8Warning: Passing None has been deprecated.
  See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases.
    result = testfunction(**testargs)

hypothesis-python/tests/datetime/test_dateutil_timezones.py::test_can_generate_non_naive_time
  /usr/lib/python3.8/site-packages/dateutil/zoneinfo/__init__.py:26: UserWarning: I/O error(2): No such file or directory
    warnings.warn("I/O error({0}): {1}".format(e.errno, e.strerror))

hypothesis-python/tests/nocover/test_recursive.py::test_drawing_from_recursive_strategy_is_thread_safe
  /usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-6

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "/usr/lib64/python3.8/threading.py", line 870, in run
      self._target(*self._args, **self._kwargs)
    File "/home/tkloczko/rpmbuild/BUILD/hypothesis-hypothesis-python-6.40.0/hypothesis-python/tests/nocover/test_recursive.py", line 136, in test
      @given(data=st.data())
    File "/home/tkloczko/rpmbuild/BUILDROOT/python-hypothesis-6.40.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/hypothesis/core.py", line 1203, in wrapped_test
      raise the_error_hypothesis_found
    File "/home/tkloczko/rpmbuild/BUILDROOT/python-hypothesis-6.40.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/hypothesis/core.py", line 899, in __flaky
      raise Flaky(message)
  hypothesis.errors.Flaky: Hypothesis test(data=data(...)) produces unreliable results: Falsified on the first call but did not on a subsequent one

    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================== slowest 20 durations ===========================================================================
23.58s call     hypothesis-python/tests/numpy/test_gen_data.py::test_efficiently_generates_all_unique_array
22.99s call     hypothesis-python/tests/nocover/test_strategy_state.py::TestHypothesis::runTest
19.05s call     hypothesis-python/tests/nocover/test_targeting.py::test_targeting_can_be_disabled
17.33s call     hypothesis-python/tests/nocover/test_pretty_repr.py::test_repr_evals_to_thing_with_same_repr
12.33s call     hypothesis-python/tests/cover/test_targeting.py::test_targeting_with_following_empty
11.68s call     hypothesis-python/tests/quality/test_float_shrinking.py::test_shrinks_downwards_to_integers
11.57s call     hypothesis-python/tests/quality/test_float_shrinking.py::test_shrinks_downwards_to_integers_when_fractional
11.40s call     hypothesis-python/tests/nocover/test_stateful.py::test_bad_machines_fail[CanSwarm]
9.23s call     hypothesis-python/tests/cover/test_searchstrategy.py::test_example_raises_unsatisfiable_when_too_filtered
8.88s call     hypothesis-python/tests/cover/test_lookup.py::test_variable_length_tuples[9]
7.69s call     hypothesis-python/tests/nocover/test_targeting.py::test_targeting_increases_max_length
7.02s call     hypothesis-python/tests/quality/test_discovery_ability.py::test_can_produce_multi_line_strings
6.93s call     hypothesis-python/tests/cover/test_validation.py::test_does_not_error_if_min_size_is_bigger_than_default_size
6.76s call     hypothesis-python/tests/quality/test_shrink_quality.py::test_minimize_multiple_elements_in_silly_large_int_range_min_is_not_dupe
6.23s call     hypothesis-python/tests/array_api/test_arrays.py::test_does_not_reuse_distinct_integers
5.85s call     hypothesis-python/tests/nocover/test_stateful.py::test_bad_machines_fail[RoseTreeStateMachine]
5.75s call     hypothesis-python/tests/redis/test_redis_exampledatabase.py::TestDBs::runTest
5.72s call     hypothesis-python/tests/quality/test_shrink_quality.py::test_minimize_multiple_elements_in_silly_large_int_range
5.65s call     hypothesis-python/tests/numpy/test_fill_values.py::test_does_not_reuse_distinct_integers
5.50s call     hypothesis-python/tests/cover/test_datetimes.py::test_bordering_on_a_leap_year
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/array_api/test_arrays.py:472: Subnormals are valid for non-FTZ builds
SKIPPED [1] tests/array_api/test_from_dtype.py:118: FixedBoundFloatStrategy(0, 1) rarely generates subnormals
SKIPPED [5] tests/array_api/test_from_dtype.py:128: Subnormals should be generated for non-FTZ builds
SKIPPED [1] tests/cover/test_randoms.py:326: randbytes not supported on this Python version
SKIPPED [1] tests/cover/test_subnormal_floats.py:49: FixedBoundFloatStrategy(0, 1) rarely generates subnormals
SKIPPED [1] tests/nocover/test_explore_arbitrary_languages.py:135: got empty parameter set ['seed', 'language'], function test_run_specific_example at /home/tkloczko/rpmbuild/BUILD/hypothesis-hypothesis-python-6.40.0/hypothesis-python/tests/nocover/test_explore_arbitrary_languages.py:134
SKIPPED [2] tests/pandas/test_data_frame.py:244: Just works on Pandas 1.4, though the changelog is silent
SKIPPED [1] tests/typing_extensions/test_backported_types.py:144: TypeAlias was added in 3.10
XFAIL tests/array_api/test_arrays.py::test_is_still_unique_with_nan_fill
  NaNs not distinct
XFAIL tests/array_api/test_arrays.py::test_unique_array_with_fill_can_use_all_elements
  NaNs not distinct
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_tuple1_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_tuple2_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_tuple_variadic_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_list_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_dict_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_set_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_frozenset_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_deque_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_defaultdict_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_ordered_dict_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_counter_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_chainmap_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_iterable_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_iterator_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_generator_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_reversible_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_container_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_collection_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_callable_ellipsis
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_callable_no_args
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_collections_set_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_collections_mutableset_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_mapping_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_mutable_mapping_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_sequence_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_mutable_sequence_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_keysview_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_itemsview_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_valuesview_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_contextmanager_as_generic
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_re_match_bytes_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_re_match_str_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_re_pattern_bytes_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py37.py::test_resolving_standard_re_pattern_str_as_generic
  Requires Python 3.9 (PEP 585) or later.
XFAIL tests/cover/test_lookup_py38.py::test_simple_optional_key_is_optional
XFAIL tests/cover/test_lookup_py38.py::test_layered_optional_key_is_optional
XFAIL tests/numpy/test_from_dtype.py::test_unicode_string_dtypes_need_not_be_utf8
  mitigation for issue above
FAILED tests/pytest/test_fixtures.py::test_given_plus_overridden_fixture - ValueError: Pytest terminal summary report not found
====================================== 1 failed, 4929 passed, 13 skipped, 12 deselected, 39 xfailed, 5 warnings in 1583.21s (0:26:23) ======================================
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-9266153a-c0c2-4d3f-b80b-573f984312c6'
  warnings.warn(
Zac-HD commented 2 years ago

Looks to me like pytest-asyncio doesn't run warnings-clean, so you'll need to do the build without that package installed.

kloczek commented 2 years ago

Looks like the issue can be solved by patch


--- a/pytest.ini~       2022-03-29 04:01:46.000000000 +0000
+++ b/pytest.ini        2022-03-29 18:59:13.691793577 +0000
@@ -1,4 +1,5 @@
 [pytest]
+asyncio_mode = auto

 # -rfEX :: Print a summary of failures, errors, and xpasses (xfails that pass).
 addopts=--strict-markers --tb=native -p pytester --runpytest=subprocess --durations=20 -rfEX
``
Zac-HD commented 2 years ago

We don't accept patches to run our self-tests outside our own test environments, but that does look like a sensible downstream solution 👍