When you run any test that uses TestContext you will get some warnings like this:
====================================================================== warnings summary ======================================================================
tests/helpers/context.py:7: 35 warnings
/mloscratch/homes/alhernan/project/workspace/nanotron/tests/helpers/context.py:7: PytestCollectionWarning: cannot collect test class 'TestContext' because i
t has a __init__ constructor (from: test_serialize.py)
class TestContext:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================== 19 passed, 8 skipped, 35 warnings in 25.47s =========================================================
This can be easily fixed by setting __test__ = False in the TestContext class. This PR fixes those warnings.
When you run any test that uses
TestContext
you will get some warnings like this:This can be easily fixed by setting
__test__ = False
in theTestContext
class. This PR fixes those warnings.