Skip to content

Migrate all unittests to pytest #1252

Open

Description

@Taniya-Das

[edited by @PGijsbers] Currently a lot of unit tests are written with the unittest module, but we want to use pytest instead. Generally speaking, this means extracting the test methods into pytest functions, optionally adding things like pytest fixtures to replace setup/tear-down logic and using plain assert instead of the unittest-based assert methods. Below is an overview of which files have already been migrated:

openml-python/tests/

Activity

  1. self-assigned this
    on Jul 6, 2023
  2. PGijsbers commented on Jul 8, 2023

    @PGijsbers
    Member

    Working on test_utils: #1269

  3. SubhadityaMukherjee commented on Jun 16, 2025

    @SubhadityaMukherjee
    Member

    This was closed in #1269

  4. PGijsbers commented on Jun 16, 2025

    @PGijsbers
    Member

    That's a slight misunderstanding. Only the tests for test_utils were converted to pytest style. The remainder of the submodules still have (many) unittest-style tests.

  5. Omswastik-11 commented on Nov 15, 2025

    @Omswastik-11
    Contributor

    Hi @PGijsbers and @Taniya-Das 👋
    I am Om , a B.Tech undergrad from India . I have a past experiece of witting tests for libraries . I want to contribute to this issue . Is this issue is open ? Can you assign me ?

  6. ravjot07 commented on Nov 23, 2025

    @ravjot07

    Hi @PGijsbers and @Taniya-Das , @naman9271

    I’d also like to contribute to this issue. I can pick up the tests that haven’t been worked on yet. I have prior experience writing and maintaining end-to-end and integration tests during my LFX project, so I’m comfortable handling test coverage.

  7. PGijsbers commented on Nov 17, 2026

    @PGijsbers
    Member

    I updated this issue to denote the last files which still require conversion. We have decided that we would prefer to tackle the last stretch of migration ourselves. The linked pull requests will still be reviewed, but the remaining files for which there is not yet a pull request will be handled by the core contributors. This is because we have seen that the simultaneous migrations, and potentially the lack of familiarity of new contributors to the code base, introduced a lot of duplication and hard to review PRs. Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions