test_ok1/testing
Ran Benita 98891a5947 python: skip pytest_pycollect_makeitem work on certain names
When a Python object (module/class/instance) is collected, for each name
in `obj.__dict__` (and up its MRO) the pytest_pycollect_makeitem hook is
called for potentially creating a node for it.

These Python objects have a bunch of builtin attributes that are
extremely unlikely to be collected. But due to their pervasiveness,
dispatching the hook for them ends up being mildly expensive and also
pollutes PYTEST_DEBUG=1 output and such.

Let's just ignore these attributes.

On the pandas test suite commit 04e9e0afd476b1b8bed930e47bf60e,
collect only, irrelevant lines snipped, about 5% improvement:

Before:

```
         51195095 function calls (48844352 primitive calls) in 39.089 seconds

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
226602/54    0.145    0.000   38.940    0.721 manager.py:90(_hookexec)
    72227    0.285    0.000   20.146    0.000 python.py:424(_makeitem)
    72227    0.171    0.000   16.678    0.000 python.py:218(pytest_pycollect_makeitem)
```

After:

```
          48410921 function calls (46240870 primitive calls) in 36.950 seconds

    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 181429/54    0.113    0.000   36.777    0.681 manager.py:90(_hookexec)
     27054    0.130    0.000   17.755    0.001 python.py:465(_makeitem)
     27054    0.121    0.000   16.219    0.001 python.py:218(pytest_pycollect_makeitem)
```
2020-08-26 17:43:57 +03:00
..
code typing: set warn_unreachable 2020-08-04 09:59:46 +03:00
example_scripts Demonstrate that plain unittest does not support async tests (#7607) 2020-08-04 19:37:41 -03:00
examples pre-commit run fix-encoding-pragma --all-files 2019-06-03 12:08:01 -03:00
freeze testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
io Merge pull request #7481 from bluetech/tw-unicode-escape 2020-07-11 16:01:45 -03:00
logging testing: fix flaky test when executed slowly 2020-08-23 12:32:30 +03:00
python python: skip pytest_pycollect_makeitem work on certain names 2020-08-26 17:43:57 +03:00
acceptance_test.py Remove broken pytest_collect_directory hook 2020-08-19 08:14:25 -03:00
conftest.py Change pytest deprecation warnings into errors for 6.0 release (#7362) 2020-07-22 21:36:51 -03:00
deprecated_test.py Reintroduce warnings postponed in 6.0 (#7637) 2020-08-22 11:17:50 -03:00
test_argcomplete.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_assertion.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_assertrewrite.py typing: set warn_unreachable 2020-08-04 09:59:46 +03:00
test_cacheprovider.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_capture.py capture: fix disabled()/global_and_fixture_disabled() enabling capturing when it was disabled 2020-08-16 23:21:45 +03:00
test_collection.py Remove broken pytest_collect_directory hook 2020-08-19 08:14:25 -03:00
test_compat.py Introduce --import-mode=importlib (#7246) 2020-06-13 11:29:01 -03:00
test_config.py config/findpaths: convert from py.path.local to pathlib 2020-08-06 18:46:17 +03:00
test_conftest.py Remove resultlog plugin 2020-08-19 08:14:28 -03:00
test_debugging.py Enable check_untyped_defs mypy option for testing/ too 2020-06-05 11:34:20 +03:00
test_doctest.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_entry_points.py Replace importlib_metadata with importlib.metadata on Python 3.8+ 2019-07-04 15:00:10 +02:00
test_error_diffs.py assertion: improve diff output of recursive dataclass/attrs 2020-07-08 19:04:56 +03:00
test_faulthandler.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_findpaths.py get_dirs_from_args handles paths with invalid syntax 2020-08-12 17:20:09 -03:00
test_helpconfig.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_junitxml.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_link_resolve.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_main.py main: improve message on `pytest path/to/a/directory::mytest` 2020-08-22 11:52:54 +03:00
test_mark.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_mark_expression.py mark/expression: prevent creation of illegal Python identifiers 2020-06-05 15:57:48 +03:00
test_meta.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_monkeypatch.py typing: set warn_unreachable 2020-08-04 09:59:46 +03:00
test_nodes.py Remove no longer needed `noqa: F821` uses 2020-07-10 13:08:56 +03:00
test_nose.py Node.location: handle str with _node_location_to_relpath 2020-01-23 10:45:31 +01:00
test_parseopt.py testing: improve bash check 2020-07-21 21:21:09 +03:00
test_pastebin.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_pathlib.py pathlib: add analogues to py.path.local's bestrelpath and common 2020-08-06 18:16:04 +03:00
test_pluginmanager.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_pytester.py typing: set warn_unreachable 2020-08-04 09:59:46 +03:00
test_recwarn.py recwarn: improve return type annotation of non-contextmanager pytest.warns 2020-06-25 14:30:42 +03:00
test_reports.py Improve typing of reports' longrepr field 2020-08-04 22:52:24 +03:00
test_runner.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_runner_xunit.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_session.py Simplify test_rootdir_wrong_option_arg (#6812) 2020-02-28 18:38:07 +01:00
test_setuponly.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_setupplan.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_skipping.py testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
test_stepwise.py testing: fix flaky tests on pypy3 due to resource warnings in stderr (#7405) 2020-06-26 09:50:19 -03:00
test_store.py Remove no longer needed `noqa: F821` uses 2020-07-10 13:08:56 +03:00
test_terminal.py Refactor Session._parsearg into a separate function for testing 2020-08-15 13:23:55 -03:00
test_tmpdir.py Format docstrings in a consistent style 2020-08-01 17:14:37 +03:00
test_unittest.py Fix test_plain_unittest_does_not_support_async on pypy3 2020-08-05 15:24:08 -03:00
test_warning_types.py Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types' 2019-06-15 11:48:34 -03:00
test_warnings.py PytestDeprecationWarning no longer a hard error 2020-08-19 08:14:28 -03:00
typing_checks.py Fix typing of params ids callable form 2020-07-14 14:53:42 +03:00