lightly-ai/lightly

Cleanup Tests

Open

#1,206 创建于 2023年5月10日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Python (337 fork)auto 404
help wanted

仓库指标

Star
 (3,775 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南