HPI/tests/core.py
Sean Breckenridge 1cdef6f40a fix mypy errors
this fixes two distinct mypy errors

one where NamedTuple/dataclassees can't be
defined locally
https://github.com/python/mypy/issues/7281

which happens when you run mypy like
mypy -p my.core on warm cache

the second error is the core/types.py file shadowing the
stdlib types module
2021-03-22 06:34:07 +00:00

21 lines
940 B
Python

'''
NOTE: Sigh. it's nice to be able to define the tests next to the source code (so it serves as documentation).
However, if you run 'pytest --pyargs my.core', it detects 'core' package name (because there is no my/__init__.py)
(see https://docs.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code)
This results in relative imports failing (e.g. from ..kython import...).
By using this helper file, pytest can detect the package name properly. A bit meh, but perhaps after kython is moved into the core,
we can run against the tests in my.core directly.
'''
from my.core.cfg import *
from my.core.common import *
from my.core.core_config import *
from my.core.error import *
from my.core.util import *
from my.core.discovery_pure import *
from my.core.freezer import *
from my.core.stats import *
from my.core.serialize import test_serialize_fallback