Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sonic-py-common] Clear environment variables before running device_i…
…nfo tests (#7273) #### Why I did it To ensure any environment variables which are configured in the build/test environment do not influence the behavior of sonic-py-common during unit tests. For example, variables which might be set by continuous integration pipelines. #### How I did it Add class-scoped pytest fixture to `TestDeviceInfo` class which stashes the current environment variables, clears them and yields. Once all the test cases in the class finish, the fixture will restore the original environment variables. Also remove unnecessary unittest-style setup and teardown functions from interface_test.py
- Loading branch information