Hi,
When I try to run tox, I get an error in test_tryton.py:
root@dfa338eb8779:/code# tox -e py310-sqlite
.pkg: _optional_hooks> python /usr/local/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta legacy
.pkg: get_requires_for_build_editable> python /usr/local/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta legacy
.pkg: build_editable> python /usr/local/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta legacy
py310-sqlite: install_package> python -I -m pip install --force-reinstall --no-deps /code/.tox/.tmp/package/3/request-6.8.0-0.editable-py3-none-any.whl
py310-sqlite: commands[0]> coverage run ‘–omit=/tests/’ -m xmlrunner discover -s tests
Running tests…
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/database.py:428: UserWarning: The path specified in the URI will be overridden
warnings.warn(“The path specified in the URI will be overridden”)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:296: UserWarning: Unable to remove not null with SQLite backend
warnings.warn(‘Unable to remove not null with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:287: UserWarning: Unable to drop foreign key with SQLite backend
warnings.warn(‘Unable to drop foreign key with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:301: UserWarning: Unable to add constraint with SQLite backend
warnings.warn(‘Unable to add constraint with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:212: UserWarning: Unable to set default on column with SQLite backend
warnings.warn(‘Unable to set default on column with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:294: UserWarning: Unable to set not null with SQLite backend
warnings.warn(‘Unable to set not null with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:284: UserWarning: Unable to add foreign key with SQLite backend
warnings.warn(‘Unable to add foreign key with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:304: UserWarning: Unable to drop constraint with SQLite backend
warnings.warn(‘Unable to drop constraint with SQLite backend’)
/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/backend/sqlite/table.py:324: UserWarning: Can not create index with parameters
warnings.warn(“Can not create index with parameters”)
======================================================================
ERROR [0.000s]: setUpClass (test_module.RequestTestCase)
Traceback (most recent call last):
File “/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/tests/test_tryton.py”, line 253, in setUpClass
activate_module(modules, lang=cls.language)
File “/code/.tox/py310-sqlite/lib/python3.10/site-packages/trytond/tests/test_tryton.py”, line 88, in activate_module
assert len(records) == len(modules)
AssertionError
Ran 0 tests in 9.998s
FAILED (errors=1)
Generating XML reports…
/code/.tox/py310-sqlite/lib/python3.10/site-packages/coverage/control.py:958: CoverageWarning: No data was collected. (no-data-collected); see
self._warn(“No data was collected.”, slug=“no-data-collected”)
py310-sqlite: exit 1 (11.84 seconds) /code> coverage run ‘–omit=/tests/’ -m xmlrunner discover -s tests pid=54
py310-sqlite: FAIL code 1 (15.29=setup[3.45]+cmd[11.84] seconds)
evaluation failed
(15.51 seconds)
It seems that tox can’t activate our module.
In fact, I couldn’t find our module in the tox environment:
root@dfa338eb8779:/code# ls -altr .tox/py310-sqlite/lib/python3.10/site-packages/trytond/modules/
total 56
drwxr-xr-x 5 root root 4096 Mar 3 22:18 ldap_authentication
drwxr-xr-x 8 root root 4096 Mar 3 22:18 currency
drwxr-xr-x 8 root root 4096 Mar 3 22:18 country
drwxr-xr-x 7 root root 4096 Mar 3 22:18 party
drwxr-xr-x 7 root root 4096 Mar 3 22:18 company
drwxr-xr-x 7 root root 4096 Mar 3 22:18 product
drwxr-xr-x 7 root root 4096 Mar 3 22:18 stock
-rw-r–r-- 1 root root 15295 Mar 3 22:18 init.py
drwxr-xr-x 2 root root 4096 Mar 3 22:18 pycache
drwxr-xr-x 10 root root 4096 Mar 3 22:18 .
drwxr-xr-x 13 root root 4096 Mar 3 22:18 ..
Can anyone give me any ideas? Thanks.