azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

[ACR] Pytest cannot collect all tests

Open YalinLi0312 opened this issue 2 years ago • 0 comments

PytestCollectionWarning: cannot collect test class 'TestContainerRegistryClientAsync' because it has a __init__ constructor (from: sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client_async.py)

Pytest only collect test prefixed test functions or methods inside Test prefixed test classes, the test class should not include an __init___ method. We added an __init__ method in ContainerRegistryTestClass to make sure all test resources are ready before running all tests, it should move to another function and delete the __init__.

YalinLi0312 avatar Dec 27 '22 23:12 YalinLi0312