for a reason not entirely clear to me (must be about imports) when running pytest -sv -k tests/test_train.py
can get it to work only with having the function in the test class like e.g. test learner
def this_tests(*args):
def register(*args):
RegisterTestsPerAPI.this_tests(*args)
Getting error:
TypeError: this_tests() takes 1 positional argument but 2 were given
The issue only exists when calling pytest -sv -k tests/test_train.py
Import used (and I tried all other combos): from fastai.gen_doc.doctest import this_tests
When using make test, I can have that function in doctest only and the import in conftest works: from fastai.gen_doc.doctest import *
tried also with fixtures, no luck. issue is about the correct import only for multiposition arguments like *args.
Tips welcome, tried quite a bit and googled around