Closed kloczek closed 3 years ago
The genty test suite doesn't use pytest, it uses unittest, so for the testing step in your packaging I recommend running unittest instead of pytest, as the genty project intends, then it should work.
pytest does have unittest compatibility, but which appears not to work well for this test suite. If you meant to report that, then we can have a further look.
pytest does have unittest compatibility, but which appears not to work well for this test suite. If you meant to report that, then we can have a further look.
OK, so what I should do? Did I not report that in this case pytest "appears not work well"? (kidding :P)
Nevertheless pytest code have been trying to test that and something went wrong :/ .. which may be simptom of some bug unrelatet do fact that pytast has nor unittest compatybility .. (?)
Genty completely messes around in the class
IMHO pytest should not be responsible for the mess
pip list
from the virtual environment you are usingI'm trying to package
genty
module as rpm packag. So I'm using typical in such case build, install and test cycle used on building package from non-root account:test/test_genty_args.py ............ [ 12%] test/test_genty_dataset.py ............ [ 25%] test/test_example.py . INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 269, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 323, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in
INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(args)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 348, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in
INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function( args)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py", line 89, in pytest_runtest_protocol
INTERNALERROR> self.runner.pytest_runtest_protocol(item, nextitem)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 108, in pytest_runtest_protocol
INTERNALERROR> ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
INTERNALERROR> File "/usr/lib64/python3.8/functools.py", line 967, in get
INTERNALERROR> val = self.func(instance)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/nodes.py", line 587, in location
INTERNALERROR> location = self.reportinfo()
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 340, in reportinfo
INTERNALERROR> fspath, lineno = getfslineno(obj)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/_code/code.py", line 1194, in getfslineno
INTERNALERROR> obj = get_real_func(obj)
INTERNALERROR> File "/usr/lib/python3.8/site-packages/_pytest/compat.py", line 271, in get_real_func
INTERNALERROR> raise ValueError(
INTERNALERROR> ValueError: could not find real function of <function ExampleTests.test_example_of_repeat at 0x7fb9861c9c10>
INTERNALERROR> stopped at <function ExampleTests.test_example_of_repeat at 0x7fb9861c9c10>
============================================================================ 25 passed in 0.37s ============================================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'.