[opensuse-python] HyperKitty testsuite
Hi! Package with this cute name landed in devel:languages:python:mailman/python-HyperKitty Nevertheless it lacks any content in %check. Unfortunately I have no idea how to use its testsuite. Could you please help me? It needs not to be a solution, just a pointer. Petr -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
pgajdos píše v Pá 08. 11. 2019 v 11:44 +0100:
Hi!
Package with this cute name landed in
devel:languages:python:mailman/python-HyperKitty
Nevertheless it lacks any content in %check. Unfortunately I have no idea how to use its testsuite. Could you please help me? It needs not to be a solution, just a pointer.
Petr
Hi, if you look on the gitlab they use tox to execute it themselves [1]. In there they call: coverage run example_project/manage.py test -- settings=hyperkitty.tests.settings_test {posargs:hyperkitty} So for our needs it would be: %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python example_project/manage.py test -- settings=hyperkitty.tests.settings_test HTH Tom [1] https://gitlab.com/mailman/hyperkitty/blob/master/tox.ini
On Fri, Nov 08, 2019 at 11:16:18AM +0000, Tomas Chvatal wrote:
In there they call: coverage run example_project/manage.py test -- settings=hyperkitty.tests.settings_test {posargs:hyperkitty}
So for our needs it would be:
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python example_project/manage.py test -- settings=hyperkitty.tests.settings_test
Yes, based on tox.ini, invoking example_project/manage.py was my idea too, even if a bit different. Running literally what you are suggesting I get: $ PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-HyperKitty-1.3.0-0.x86_64/usr/lib/python3.7/site-packages $ python3 example_project/manage.py test -- settings=hyperkitty.tests.settings_test ====================================================================== ERROR: settings=hyperkitty (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: settings=hyperkitty Traceback (most recent call last): File "/usr/lib64/python3.7/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) ModuleNotFoundError: No module named 'settings=hyperkitty' ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) $ I am clearly missing something .. Petr -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
pgajdos píše v Pá 08. 11. 2019 v 12:46 +0100:
On Fri, Nov 08, 2019 at 11:16:18AM +0000, Tomas Chvatal wrote:
In there they call: coverage run example_project/manage.py test -- settings=hyperkitty.tests.settings_test {posargs:hyperkitty}
So for our needs it would be:
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python example_project/manage.py test -- settings=hyperkitty.tests.settings_test
Yes, based on tox.ini, invoking example_project/manage.py was my idea too, even if a bit different. Running literally what you are suggesting I get:
Figured out a way, but it is still failing now on DB initialization&stuff: https://build.opensuse.org/package/rdiff/devel:languages:python:mailman/python-HyperKitty?linkrev=base&rev=7 Cheers Tom
On Fri, Nov 08, 2019 at 12:49:48PM +0000, Tomas Chvatal wrote:
Figured out a way, but it is still failing now on DB initialization&stuff:
Yes, but much better than before .. Thanks, Petr -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
participants (2)
-
pgajdos
-
Tomas Chvatal