lightly-ai/lightly

Cleanup Tests

Ouverte

#1 206 ouverte le 10 mai 2023

 (0 commentaire) (0 réaction) (0 personne assignée)Python (337 forks)auto 404
help wanted

Métriques du dépôt

Stars
 (3 775 étoiles)
Métriques de merge PR
 (Merge moyen 8j) (34 PRs mergées en 30 j)

Description

Description

The goal is to:

  • Rename test files to match package file structure
  • Move all tests to pytest format
  • Split subtests into individual tests or use pytest.mark.parametrize
  • Move tests for classes into classes and tests for functions into functions. For example:
    class TestClassName:
        def test_method(self) -> None:
            assert ClassName().method() == something
    
    def test_function() -> None:
        assert module.function() == something
    

In this issue we don't care about the api tests. They are handled in a different project.

For outdated/deprecated modules, such as active learning, we should keep the effort minimal. I would suggest to only make the test filenames match the package file structure. But not change the tests themselves.

See https://github.com/lightly-ai/lightly/blob/master/tests/models/modules/test_memory_bank.py for an example test file.

Tasks

  • Cleanup tests for the lightly/transforms subpackage
  • Cleanup tests for the lightly/loss subpackage
  • Cleanup tests for the lightly/models/modules subpackage
  • Cleanup tests for lightly/models/utils.py
  • Rename test files for models in lightly/models subpackage
  • Cleanup tests for the lightly/data subpackage
  • Cleanup tests for the lightly/embedding subpackage
  • Cleanup tests for lightly/utils subpackage

Guide contributeur