Skip to content

Replace tests by unittests #355

@paulzierep

Description

@paulzierep

Since we cannot use the current tests for PR testing (github does not allow using the API keys - and we also should not do that).
We should replace the current test framework: https://github.com/galaxyproject/galaxy_codex/blob/main/.github/workflows/run_tests.yaml
With mocked unittests (mocking the API calls) like: https://github.com/galaxyproject/galaxy_codex/tree/main/sources/bin/tests
Once we have a good code coverage we can only rely on the unittests.
Currently we got:

Name                              Stmts   Miss  Cover
-----------------------------------------------------
bin/extract_galaxy_tools.py         515    425    17%
bin/extract_galaxy_workflows.py     300    197    34%
bin/shared.py                        75     34    55%
-----------------------------------------------------
TOTAL                               890    656    26%

Check with:

PYTHONPATH=bin coverage run -m unittest discover -s bin/tests
coverage report --omit="bin/tests/*"

Should we add the code coverage in the CI ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions