magnetic-lab / magla

A free SQL-powered data pipeline for animation and visual-effects freelancers and studios, with an emphasis on dynamically generated `opentimelineio` timelines.
GNU General Public License v3.0
17 stars 0 forks source link

implement `pytest` testing #1

Open jacobmartinez3d opened 4 years ago

jacobmartinez3d commented 4 years ago

At this stage preparing full test coverage is not only necessary for deployment but is also going to help consolidate all the remaining todos and fixes left before initial alpha release.

jacobmartinez3d commented 4 years ago

1-implement-pytest-module

Figuring out how to handle dummy DB interactions with startup/teardown methods. Need to organize further into testsuites so I can loop over each entity-type while still having individual test-cases per-entity.

jacobmartinez3d commented 4 years ago

Noticing some really bad traceback barf when MaglaTest encounters bad seed data. Make sure to include good error handling for PR.

jacobmartinez3d commented 4 years ago

The test module will be merged in 3 stages:

Phase 1 (unit)

Methods available from within a sub-classed MaglaEntityTestFixture test:

# reset the seed object to match seed data
self.reset(seed_object)

# retrieve all seed data-tuples for given entity-type
self.get_seed_data("<entity name>")

# retrieve the seed data for a given entity and seed-index
self.get_seed_data("<entity name>", 1)

Phase 2 (critical integration)

Phase 3 (expensive integration)