Open sfermigier opened 5 years ago
@sfermigier, can you explain how does it fix tests? To me it looks like you are commenting Test Suites, or is there something I'm missing? Anyways it's cool to see someone is still contributing to this project.
In commit 6af2aa9 I'm getting rid of the TestSuite
objects which are redundant when using, as we do, pytest (pytest does its own discovery of the tests it has to run).
This fixes the two errors that were reported before this commit, due to non-existing test cases (ModelTestCase
and AggregationBrowserTestCase
) being put in the test suites without being defined.
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(AttributeTestCase))
suite.addTest(unittest.makeSuite(LevelTestCase))
suite.addTest(unittest.makeSuite(HierarchyTestCase))
suite.addTest(unittest.makeSuite(DimensionTestCase))
suite.addTest(unittest.makeSuite(CubeTestCase))
> suite.addTest(unittest.makeSuite(ModelTestCase))
E NameError: name 'ModelTestCase' is not defined
tests/metadata/test_model.py:937: NameError
____________________________________________________________________________________ test_suite _____________________________________________________________________________________
def test_suite():
suite = unittest.TestSuite()
> suite.addTest(unittest.makeSuite(AggregationBrowserTestCase))
E NameError: name 'AggregationBrowserTestCase' is not defined
Also:
before this commit:
2 failed, 108 passed, 58 skipped, 4 warnings in 1.81 seconds
After this commit:
108 passed, 58 skipped, 10 warnings in 3.30 seconds
in other words, we have 110 non-skipped tests in both cases.
Ok makes sense, also I forgot you branched from 2.0. Thank you @sfermigier.
Fix tests, add tox config, modernise code (py 3.6 only).