Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 test fails: ModuleNotFoundError: No module named 'flasgger_package' #605

Open
yurivict opened this issue Jan 6, 2024 · 0 comments
Open

Comments

@yurivict
Copy link

yurivict commented Jan 6, 2024

cd /usr/ports/www/py-flasgger/work-py39/flasgger-0.9.7.1 && /usr/bin/env XDG_DATA_HOME=/usr/ports/www/py-flasgger/work-py39  XDG_CONFIG_HOME=/usr/ports/www/py-flasgger/work-py39  XDG_CACHE_HOME=/usr/ports/www/py-flasgger/work-py39/.cache  HOME=/usr/ports/www/py-flasgger/work-py39 PATH=/usr/local/libexec/ccache:/usr/ports/www/py-flasgger/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/www/py-flasgger/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "  MANPREFIX="/usr/local" CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" PYTHONPATH=/usr/ports/www/py-flasgger/work-py39/stage/usr/local/lib/python3.9/site-packages /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= 
==================================================================================== test session starts ====================================================================================
platform freebsd14 -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/usr/ports/www/py-flasgger/work-py39/flasgger-0.9.7.1/.hypothesis/examples'))
Using --randomly-seed=2815003111
rootdir: /usr/ports/www/py-flasgger/work-py39/flasgger-0.9.7.1
plugins: anyio-4.1.0, flake8-1.1.1, mock-3.10.0, time-machine-2.11.0, flaky-3.7.0, aspectlib-2.0.0, cov-4.1.0, hypothesis-6.92.1, randomly-3.12.0, pytest_httpserver-1.0.8, xdist-3.5.0, checkdocs-2.10.1
collected 14 items / 1 error                                                                                                                                                                

========================================================================================== ERRORS ===========================================================================================
__________________________________________________________________________ ERROR collecting tests/test_examples.py __________________________________________________________________________
/usr/local/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/local/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/local/lib/python3.9/site-packages/_pytest/python.py:534: in collect
    return super().collect()
/usr/local/lib/python3.9/site-packages/_pytest/python.py:455: in collect
    res = ihook.pytest_pycollect_makeitem(
/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
/usr/local/lib/python3.9/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/local/lib/python3.9/site-packages/_pytest/python.py:271: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
/usr/local/lib/python3.9/site-packages/_pytest/python.py:498: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py:552: in call_extra
    return self._hookexec(self.name, hookimpls, kwargs, firstresult)
/usr/local/lib/python3.9/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
tests/conftest.py:85: in pytest_generate_tests
    for mod in get_examples()
flasgger/utils.py:549: in get_examples
    modules = [import_module(module) for module in pathify(basenames)]
flasgger/utils.py:549: in <listcomp>
    modules = [import_module(module) for module in pathify(basenames)]
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:850: in exec_module
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
examples/package_example.py:9: in <module>
    from flasgger_package import package_view
E   ModuleNotFoundError: No module named 'flasgger_package'
===================================================================================== warnings summary ======================================================================================
../../../../../local/lib/python3.9/site-packages/flex/validation/schema.py:129
  /usr/local/lib/python3.9/site-packages/flex/validation/schema.py:129: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    if isinstance(items, collections.Mapping):

../../../../../local/lib/python3.9/site-packages/marshmallow/fields.py:944
  /usr/local/lib/python3.9/site-packages/marshmallow/fields.py:944: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit `metadata=...` argument instead. Additional metadata: {'min': 18}
    super().__init__(**kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 2 warnings, 1 error in 1.79s ================================================================================
*** Error code 2

flasgger_package isn't installed by the project.

Version: 0.9.7.1
Python 3.9
FreeBSD 14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant