Skip to content

Minimal working testing scripts #11

@annahaensch

Description

@annahaensch

Originally raised by @maminian on 18 Feb. 2022

It's common for modern software packages have built-in testing. Whether this is formal unit tests, or just a naive run-through of some commands with expected outputs isn't so important for now.

But, ideally it should:

  1. Match up with standards that GitHub (for instance) can do to automatically verify. For instance, when one does a Pull request on Github, there's a box that alludes to this.
  2. Be understandable
  3. Be expandable or follow some template, so that more tests could be later.
  4. Use an existing infrastructure (probably matches up with point 1. here). Meaning, use some package. Options here: unittest (looks like it's in "core" Python?) and pytest (which isn't). Should compare these (or get the internet's opinion) before picking one and sticking with it.

To satisfy this issue, just go through 1-5 and make a test that is "satisfied" if one can "import" our package successfully (whatever that means). It should work independent of any specific data set - so the test might be very naive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions