Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: WIP Migrate from unittest to pytest #1879

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kinow
Copy link
Member

@kinow kinow commented Dec 12, 2024

In GitLab by @kinow on Nov 10, 2023, 16:48

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.py which is tested by CICD with pip 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.

@kinow kinow added this to the Autosubmit 4.1 milestone Dec 12, 2024
@kinow kinow self-assigned this Dec 12, 2024
@kinow
Copy link
Member Author

kinow commented Dec 12, 2024

In GitLab by @kinow on Nov 14, 2023, 15:58

marked the checklist item test_pjm.py as completed

@kinow
Copy link
Member Author

kinow commented Dec 12, 2024

In GitLab by @kinow on Nov 14, 2023, 15:59

added 1 commit

Compare with previous version

@kinow
Copy link
Member Author

kinow commented Dec 12, 2024

In GitLab by @kinow on Nov 29, 2023, 14:49

mentioned in merge request ces/autosubmit4-config-parser!3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement] Use pytest instead of unittest for writing tests for Autosubmit
1 participant