Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Make tests more flexible to multiple interfaces #39

Closed Jaymon closed 1 year ago

Jaymon commented 7 years ago

Right now tests usually instantiate a Postgres or a SQLite interface, it would be cool if a test runner could be added that will set the environment variable to Postgres, then run all the tests and then set, the environment variable to SQLite and run all the tests, this way you would just have to modify one thing (like adding a MySQL dsn) and it would automatically run all the tests against the new environment variable.

Something like this should allow us to consolidate the Postgres gevent tests because they could be simplified to just another dsn.

For an example of a bad test that instantiates each is config_test.ObjectFieldTest

Jaymon commented 1 year ago

This has been mostly taken care of with EnvironTestCase that runs all the tests for each found PROM_TEST_DSN