zowe / zowe/zowe-client-python-sdk
[tests]: Make each unit test stand-alone
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 38
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
Is your feature or enhancement request related to a problem or limitation? Please describe
Currently, some of the unit tests in test_zowe_core.py that access the keyring cannot be run individually, because they rely on some setup to be done by an earlier test.
Describe your enhancement idea
Each test should perform all of the necessary setup.
Describe alternatives you've considered
Running all the tests in the file works, but may be less convenient.
Provide any additional context
An example of a test that currently fails when run standalone is test_profile_loading_exception - thanks @pem70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in test_zowe_core.py by running test_profile_loading_exception on its own and then with the full file to observe the dependency. Identify the setup earlier tests provide, make each affected test perform its own necessary setup, and verify both standalone execution and the complete test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100