zowe / zowe/zowe-client-python-sdk

[tests]: Make each unit test stand-alone

Open
#269 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority-low
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.