GithubHelp home page GithubHelp logo

implement `pytest` testing about magla HOT 3 OPEN

magnetic-lab avatar magnetic-lab commented on September 22, 2024
implement `pytest` testing

from magla.

Comments (3)

jacobmartinez3d avatar jacobmartinez3d commented on September 22, 2024

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.

from magla.

jacobmartinez3d avatar jacobmartinez3d commented on September 22, 2024

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

from magla.

jacobmartinez3d avatar jacobmartinez3d commented on September 22, 2024

The test module will be merged in 3 stages:

Phase 1 (unit)

  • test direct CRUD operations with SQLAlchemy session object.
  • isolate and test individual sub-entities as far as possible without requiring other magla entities or modules(magla.utils is ok).
  • make sure to always compare backend data with seed data used initially.

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)

  • Complete the remaining test-coverage from phase 1 still using the same seed data from file.
  • perform filesystem manipulation during this phase.

Phase 3 (expensive integration)

  • Test all magla CRUD operations and remaining edge case tests.

from magla.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.