Skip to content

TST: Use mocks in high-level functions + test Model classes directly #798

@NickleDave

Description

@NickleDave

Right now we test functions like vak.train.frame_classification.train_frame_classification_model by actually fitting a model. These tests are long running.

I'm wondering if we should instead mock out the call to Trainer.train (or Trainer.test or Trainer.predict as the case may be) and instead test each Model class directly in its tests module, with fake data.

The downside is that we miss out on testing different ways of calling the higher level functions.
But if we want to move towards being more of a domain-specific torch library with support for only a very fixed way of calling these internal functions then that's probably ok.

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