即使使用__init__.py,也如何解决 “尝试以非软件包方式进行相对导入”

pkg/
  __init__.py
  components/
    core.py
    __init__.py
  tests/
    core_test.py
    __init__.py
from ..components.core import GameLoopEvents
tests$ python core_test.py 
Traceback (most recent call last):
  File "core_test.py", line 3, in <module>
    from ..components.core import GameLoopEvents
ValueError: Attempted relative import in non-package

答案