You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Python 3 load_tests() function that is defined in
unit/suites/__init__.py is called to filter unittest.TestCase classes to
run.
On Python 2 the function is not called and all unittest.TestCase classes
are subject to run. I plan to define a hierarchy of test cases in the
schema reload test and exclude the base class from the list to run, so
this behaviour is not desired.
The reason of the difference between unittest behaviour on Python 2 and
Python 3 is described in the TestLoader#discover() function
documentation (see [1]):
| Changed in version 3.5: Found packages are now checked for load_tests
| regardless of whether their path matches pattern, because it is
| impossible for a package name to match the default pattern.
The default pattern is 'test*.py'.
[1]: https://docs.python.org/3/library/unittest.html#unittest.TestLoader.discover
0 commit comments