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
It may be easier to have an app settings structure like this to avoid modifying sys.modules[__name__] = Settings() (see 5.0's settings) as this adds complexity to imports, preventing simplification of maintenance / testing / etc #136
poetry run py.test ============================ test session starts ============================= collected 0 items / 1 error =================================== ERRORS =================================== __________________ ERROR collecting src/robots/settings.py ___________________ .venv/lib/python3.10/site-packages/_pytest/runner.py:338: in from_call result: Optional[TResult] = func() cls = <class '_pytest.runner.CallInfo'> duration = 0.0004884000009042211 excinfo = <ExceptionInfo ImportPathMismatchError('robots.settings', None, PosixPath('~/work/python/django-robots/src/robots/settings.py')) tblen=4> func = <function pytest_make_collect_report.<locals>.<lambda> at 0x7f95b64d1480> precise_start = 43076.9144613 precise_stop = 43076.9149497 reraise = None result = None start = 1665841416.0452023 stop = 1665841416.045692 when = 'collect' .venv/lib/python3.10/site-packages/_pytest/runner.py:369: in <lambda> call = CallInfo.from_call(lambda: list(collector.collect()), "collect") collector = <DoctestModule settings.py> .venv/lib/python3.10/site-packages/_pytest/doctest.py:545: in collect module = import_path( MockAwareDocTestFinder = <class '_pytest.doctest.DoctestModule.collect.<locals>.MockAwareDocTestFinder'> doctest = <module 'doctest' from '~/.python/installs/python/3.10.7/lib/python3.10/doctest.py'> self = <DoctestModule settings.py> .venv/lib/python3.10/site-packages/_pytest/pathlib.py:543: in import_path
raise ImportPathMismatchError(module_name, module_file, path)
E _pytest.pathlib.ImportPathMismatchError: ('robots.settings', None, PosixPath('~/work/python/django-robots/src/robots/settings.py')) ignore = ''
mod = <robots.settings.Settings object at 0x7f95b6133f10>
mode = <ImportMode.prepend: 'prepend'>
module_file = None
module_name = 'robots.settings'
names = ['robots', 'settings']
p = PosixPath('~/work/python/django-robots/src/robots/settings.py')
path = PosixPath('~/work/python/django-robots/src/robots/settings.py')
pkg_path = PosixPath('~/work/python/django-robots/src/robots')
pkg_root = PosixPath('~/work/python/django-robots/src')
root = PosixPath('~/work/python/django-robots')
========================== short test summary info =========================== ERROR src/robots/settings.py - _pytest.pathlib.ImportPathMismatchError: ('r...
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!
============================== 1 error in 0.20s ==============================
make[1]: *** [Makefile:24: test] Error 2
make[1]: Leaving directory '~/work/python/django-robots'
make[1]: Entering directory '~/work/python/django-robots'
poetry run py.test
============================ test session starts =============================
collected 0 items / 4 errors
The text was updated successfully, but these errors were encountered:
It may be worth seeing if there's a standard / best practice jazzband would like to establish for django testing (just use unittest with django.test? or pytest w/ pytest-django?)
At this time I don't have the ability to maintain / deliberate the change - so to avoid the impression of being able to commit the time I will close for now
Anyone is welcome to reference / bring this up later.
It may be easier to have an app settings structure like this to avoid modifying
sys.modules[__name__] = Settings()
(see 5.0's settings) as this adds complexity to imports, preventing simplification of maintenance / testing / etc #136The text was updated successfully, but these errors were encountered: