Draft: WIP Migrate from unittest to pytest
Closes #961
Current status:
-
test_basic_config.py -
test_catlog.py -
test_checkpoints.py -
test_chunk_date_lib.py -
test_database_managers.py (skipped -- already skipped) -
test_db_manager.py -
test_dependencies.py -
test_dic_jobs.py - [-] test_expid.py
-
test_history.py -
test_job.py -
test_job_common.py -
test_job_graph.py -
test_job_grouping.py -
test_job_list.py -
test_job_package.py -
test_log.py -
test_machinefiles_wrapper.py -
test_paramiko_platform.py -
test_pjm.py -
test_platform_monitor.py -
test_profiler.py -
test_setup.py (removed -- we test setup.py with pip install .) -
test_slurm_platform.py -
test_statistics.py (skipped -- already skipped) -
test_strategies.py -
test_wrappers.py -
provenance/test_rocrate.py -
helpers/test_parameters.py
When migrating the tests, I am also:
- Fixing License header
- Fixing unused imports
- Removing unnecessary tests (e.g. testing
setup.pywhich is tested by CICD withpip install)
To run tests just remember to change the default runner in your IDE, and for command line simply run pytest in the project folder. The settings are all defined in pytest.ini.
Once this is merged, it should be a lot easier to use pytest for the integration tests, and start adding tests for parts of the code that we are not able to test now.
Edited by Bruno de Paula Kinoshita