Closed paolostivanin closed 4 years ago
Thanks for the heads-up. Any reference or pointer regarding it please. I knew nose development was stopped.
I was thinking about something like remove_nose.patch, but I got zillion failures, which don't seem like a product of my effort. See full build log.
could it because of this one? https://github.com/moremoban/moban/blob/dev/tests/__init__.py
nose would load init.py
I am on it right now.
-class TestHandleTemplateFunction:
+class TestHandleTemplateFunction(unittest.TestCase):
def setUp(self):
self.base_dir = [fs.path.join("tests", "fixtures")]
nose
runs setUp(), but pytest
does not when you do not derive from unittest.TestCase
.
I hope I am very near to the solution with: https://build.opensuse.org/package/view_file/home:pgajdos:python/python-moban/python-moban-remove-nose.patch
Last thing I need to resolve is:
[ 6s] /usr/lib/python3.8/site-packages/lml/plugin.py:290: in load_me_now
[ 6s] self.raise_exception(key)
[ 6s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 6s]
[ 6s] self = <moban.core.moban_factory.MobanFactory object at 0x7f7b5c027460>
[ 6s] key = 'copy'
[ 6s]
[ 6s] def raise_exception(self, key):
[ 6s] > raise exceptions.NoThirdPartyEngine(key)
[ 6s] E moban.exceptions.NoThirdPartyEngine: copy
[ 6s]
[ 6s] moban/core/moban_factory.py:82: NoThirdPartyEngine
@mcepl, @chfw, would you have any idea how it should be fixed?
@mcepl, @chfw, would you have any idea how it should be fixed?
Could you publish whole log, I am afraid, you have posted here just the end of the error message?
copy.py
is one of plugins under moban/plugins
.
(So I guess it is just not found.)
load_engine_factory_and_engines()
should be called before the unit test start.
could it because of this one? https://github.com/moremoban/moban/blob/dev/tests/__init__.py
nose would load init.py
Yep, setup() from there seem not to be called.
This works, is that acceptable?
--- __init.py.orig 2020-09-21 12:30:35.503025296 +0000
+++ __init__.py 2020-09-21 12:30:44.911084197 +0000
@@ -1,5 +1,4 @@
from moban.main import load_engine_factory_and_engines
-def setup():
- load_engine_factory_and_engines()
+load_engine_factory_and_engines()
Perhaps as setUpClass()
or setUpModule()
https://docs.python.org/3/library/unittest.html?highlight=setup#class-and-module-fixtures ?
Yes, this works as well.
Hello, just a heads-up that nose will no longer work with python 3.9/3.10+ :)