dropbox / stone

The Official API Spec Language for Dropbox API V2
https://www.dropbox.com/developers
MIT License
400 stars 79 forks source link

test failure: No module named 'test.backend_test_util' #343

Open 0-wiz-0 opened 2 months ago

0-wiz-0 commented 2 months ago

When I run using the pypi distfile, I get:

============================================================================== ERRORS ===============================================================================
______________________________________________________________ ERROR collecting test/test_js_client.py ______________________________________________________________
ImportError while importing test module '/scratch/net/py-stone/work/stone-3.3.8/test/test_js_client.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/pkg/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test/test_js_client.py:7: in <module>
    from test.backend_test_util import _mock_output
E   ModuleNotFoundError: No module named 'test.backend_test_util'
______________________________________________________________ ERROR collecting test/test_tsd_types.py ______________________________________________________________
ImportError while importing test module '/scratch/net/py-stone/work/stone-3.3.8/test/test_tsd_types.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/pkg/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test/test_tsd_types.py:19: in <module>
    from test.backend_test_util import _mock_output
E   ModuleNotFoundError: No module named 'test.backend_test_util'
====================================================================== short test summary info ======================================================================
ERROR test/test_js_client.py
ERROR test/test_tsd_types.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I only find two matches for the string:

stone-3.3.8/test/test_js_client.py:from test.backend_test_util import _mock_output
stone-3.3.8/test/test_tsd_types.py:from test.backend_test_util import _mock_output

I'm not sure where this should be coming from, did I miss installing a dependency?

greg-db commented 2 months ago

Thanks for the report. I can ask the team to check on this for you, but for reference can you share the code/command you are running that reproduces this issue?

0-wiz-0 commented 2 months ago

Thanks for looking at this. I just run pytest.

greg-db commented 2 months ago

Thanks, I'll ask the team to look into it. Any other more specific steps to reproduce the issue or more specific information may also be helpful for their reference.

0-wiz-0 commented 2 months ago

I build in an empty sandbox where I install the following Python modules:

build-1.2.1
coverage-7.5.4
iniconfig-2.0.0nb1
installer-0.7.0nb1
mock-3.0.5nb1
packaging-24.1
pluggy-1.5.0
ply-3.11nb1
pyparsing-3.1.2
pyproject_hooks-1.0.0nb1
setuptools-72.1.0
six-1.16.0nb1
stone-3.3.8
test-8.2.2
wheel-0.44.0

and Python 3.12.5. Then I run python3.12 -m build --wheel --skip-dependency-check --no-isolation to build and pytest to test.