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
Putting coverage aside, there is a lot of boilerplate code in our Python unit test suite, and the tests all seem to use unittest.makeSuite, which is undocumented and deprecated.
Let's:
Replace the use of makeSuite.
See if the runner code quoted below can be made less horribly redundant.
Have a look at any other clean ups of the scaffolding?
try:
import options
import test_contexts
import test_domain_decomposition
# […]
except ModuleNotFoundError:
from test import options
from test.unit import test_contexts
from test.unit import test_domain_decompositions
# […]
test_modules = [\
test_contexts,\
test_domain_decompositions,\
# […]
]
def suite():
loader = unittest.TestLoader()
suites = []
for test_module in test_modules:
test_module_suite = test_module.suite()
suites.append(test_module_suite)
suite = unittest.TestSuite(suites)
return suite
The text was updated successfully, but these errors were encountered:
Continuing here then, yes, it's pretty terrible! I don't think arbor has a need that unittest cannot meet. Unless there's someone who is really obsessed with fancy fixtures.
I can look into dropping all of the boilerplate in favor of python -m unittest discover
Putting coverage aside, there is a lot of boilerplate code in our Python unit test suite, and the tests all seem to use
unittest.makeSuite
, which is undocumented and deprecated.Let's:
makeSuite
.The text was updated successfully, but these errors were encountered: