Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • autosubmit autosubmit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 338
    • Issues 338
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • autosubmitautosubmit
  • Merge requests
  • !391

Draft: WIP Migrate from unittest to pytest

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Bruno de Paula Kinoshita requested to merge lets-use-pytest into master Nov 10, 2023
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 22

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.

Edited Nov 14, 2023 by Bruno de Paula Kinoshita
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: lets-use-pytest