You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
refactor: remove RUNNING_TESTS global flag and running_test fixture (#4455)
* refactor: remove RUNNING_TESTS global flag and running_test fixture
Replace test-specific production code with mock/patch in tests.
- Remove RUNNING_TESTS: bool = False global from �nsys.mapdl.core
- Remove the if pymapdl.RUNNING_TESTS early-return guard from
_retrieve_file() in downloads.py and drop the dead _test
parameters from _retrieve_file and _download_file
- Remove the RUNNING_TESTS import and dead log block from
un_every_import() in helpers.py
- Simplify the session-ID check condition in mapdl_core.py:
pymapdl.RUNNING_TESTS or self._strict_session_id_check
→ self._strict_session_id_check
- Remove the Running_test context-manager class, the
unning_test
fixture, and the pymapdl.RUNNING_TESTS = True module-level
statement from ests/conftest.py
- In est_examples.py, replace with running_test(): (seven tests)
with patch('...downloads._retrieve_file', return_value=True);
strip the now-unnecessary with running_test(False): wrappers from
est_bracket and est_failed_download
- In est_mapdl.py, remove the Running_test import, drop the
with running_test(): wrapper in est_session_id (covered by
the pre-existing _strict_session_id_check = True), and drop the
with Running_test(False): wrapper in est_igesin_whitespace
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: adding changelog file 4455.miscellaneous.md [dependabot-skip]
* fix: matching test return with function return type
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
0 commit comments