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

Cleanup Tests #1206

Open
8 tasks
Tracked by #1198
guarin opened this issue May 10, 2023 · 0 comments
Open
8 tasks
Tracked by #1198

Cleanup Tests #1206

guarin opened this issue May 10, 2023 · 0 comments

Comments

@guarin
Copy link
Contributor

guarin commented May 10, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant