This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SUBMARINE-1333. Replace legacy tmpdir with tmp_path
### What is this PR for? <!-- A few sentences describing the overall goals of the pull request's commits. First time? Check out the contributing guide - https://submarine.apache.org/contribution/contributions.html --> Pytest provides both `tmp_path` and `tmpdir` fixtures to indicate the temporary directory. Nowadays, it's preferred to use the `tmp_path` fixture which returns a `pathlib.Path` instead of the legacy `tmpdir` which returns `py.path.local`. ### What type of PR is it? Improvement ### Todos ### What is the Jira issue? <!-- * Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/ * Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. `SUBMARINE-23. PR title` --> <https://issues.apache.org/jira/browse/SUBMARINE-1333> ### How should this be tested? <!-- * First time? Setup Travis CI as described on https://submarine.apache.org/contribution/contributions.html#continuous-integration * Strongly recommended: add automated unit tests for any new or changed behavior * Outline any manual steps to test the PR here. --> This PR modified the following conftest files: ```text submarine-sdk/pysubmarine/tests/ml/pytorch/model/conftest.py submarine-sdk/pysubmarine/tests/ml/tensorflow/model/conftest.py submarine-sdk/pysubmarine/tests/ml/tensorflow_v2/model/conftest.py ``` Then, run pytest on ` tests/ml/` to validate the changes: ```bash cd submarine-sdk/pysubmarine python3 -m venv .venv source .venv/bin/activate pip install -U pip setuptools wheel pip install -r github-actions/test-requirements.txt pip install -e '.[tf2,pytorch]' pytest tests/ml/ ``` ### Screenshots (if appropriate) ### Questions: * Do the license files need updating? No * Are there breaking changes for older versions? No * Does this need new documentation? No Author: huang06 <[email protected]> Signed-off-by: cdmikechen <[email protected]> Closes #1000 from huang06/tests/tmp_path and squashes the following commits: ba7fe85 [huang06] ci: change working dir in order to load pytest.ini 8afc76e [huang06] tests: replace legacy tmpdir with tmp_path
- Loading branch information