azure-sdk-for-python
azure-sdk-for-python copied to clipboard
[ACR] Pytest cannot collect all tests
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__.