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
I have spent quite a bit of time in trying to get the 'test' command into running some tests. So far I failed and didn't manage to solve the puzzle. My intention was to use this command as
docker compose run --rm odoo odoo test and maybe even target specific modules by '--test-arg=/my_module' but in any way I end up in an error (see below).
Is it me doing things wrong or is the 'test' command maybe broken?
Thx for your support,
Peter
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.10.16, pytest-8.3.4, pluggy-1.5.0
rootdir: /srv/odoo/odoo
plugins: odoo-2.1.1, cov-6.0.0
collected 0 items
2025-01-31 15:06:50,112 1 WARNING ? py.warnings: /usr/local/lib/python3.10/site-packages/coverage/control.py:892: CoverageWarning: No data was collected. (no-data-collected)
File "/usr/local/bin/dob", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/doblib/__main__.py", line 141, in main
sys.exit(CIEnvironment(args.cfg).test(left))
File "/usr/local/lib/python3.10/site-packages/doblib/ci.py", line 213, in test
result = pytest.main()
File "/usr/local/lib/python3.10/site-packages/_pytest/config/__init__.py", line 175, in main
ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config)
File "/usr/local/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 330, in pytest_cmdline_main
return wrap_session(config, _main)
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 283, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 337, in _main
config.hook.pytest_runtestloop(session=session)
File "/usr/local/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 156, in _multicall
teardown[0].send(outcome)
File "/usr/local/lib/python3.10/site-packages/pytest_cov/plugin.py", line 329, in pytest_runtestloop
self.cov_controller.finish()
File "/usr/local/lib/python3.10/site-packages/pytest_cov/engine.py", line 54, in ensure_topdir_wrapper
return meth(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pytest_cov/engine.py", line 275, in finish
self.cov.save()
File "/usr/local/lib/python3.10/site-packages/coverage/control.py", line 789, in save
data = self.get_data()
File "/usr/local/lib/python3.10/site-packages/coverage/control.py", line 870, in get_data
self._post_save_work()
File "/usr/local/lib/python3.10/site-packages/coverage/control.py", line 892, in _post_save_work
self._warn("No data was collected.", slug="no-data-collected")
WARNING: Failed to generate report: No data to report.
2025-01-31 15:06:50,120 1 WARNING ? py.warnings: /usr/local/lib/python3.10/site-packages/pytest_cov/plugin.py:341: CovReportWarning: Failed to generate report: No data to report.
File "/usr/local/bin/dob", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/doblib/__main__.py", line 141, in main
sys.exit(CIEnvironment(args.cfg).test(left))
File "/usr/local/lib/python3.10/site-packages/doblib/ci.py", line 213, in test
result = pytest.main()
File "/usr/local/lib/python3.10/site-packages/_pytest/config/__init__.py", line 175, in main
ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config)
File "/usr/local/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 330, in pytest_cmdline_main
return wrap_session(config, _main)
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 283, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/usr/local/lib/python3.10/site-packages/_pytest/main.py", line 337, in _main
config.hook.pytest_runtestloop(session=session)
File "/usr/local/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 156, in _multicall
teardown[0].send(outcome)
File "/usr/local/lib/python3.10/site-packages/pytest_cov/plugin.py", line 341, in pytest_runtestloop
warnings.warn(CovReportWarning(message), stacklevel=1)
---------- coverage: platform linux, python 3.10.16-final-0 ----------
============================================================================================== no tests ran in 0.04s =====================================
The text was updated successfully, but these errors were encountered:
I have spent quite a bit of time in trying to get the 'test' command into running some tests. So far I failed and didn't manage to solve the puzzle. My intention was to use this command as
docker compose run --rm odoo odoo test
and maybe even target specific modules by '--test-arg=/my_module' but in any way I end up in an error (see below).Is it me doing things wrong or is the 'test' command maybe broken?
Thx for your support,
Peter
The text was updated successfully, but these errors were encountered: