schireson / pytest-mock-resources

Pytest Fixtures that let you actually test against external resource (Postgres, Mongo, Redshift...) dependent code.
https://pytest-mock-resources.readthedocs.io/en/latest/quickstart.html
MIT License
179 stars 19 forks source link

refactor: Remove unnecessary namespacing of fixtures. #167

Closed DanCardin closed 2 years ago

DanCardin commented 2 years ago

All public API objects/functions are exposed at the top level and meant to be imported that way. So we should be able to safely reorganize internally.

I kept finding the odd difference in nesting level among the fixtures to be confusing and somewhat arbitrary (particularly when all of the supported fixtures live under "database" anyways) when making changes, so that's the idea of this change.

codecov[bot] commented 2 years ago

Codecov Report

Merging #167 (fe28e2a) into main (a28c490) will increase coverage by 0.08%. The diff coverage is 97.61%.

@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   82.84%   82.92%   +0.08%     
==========================================
  Files          30       29       -1     
  Lines        1306     1318      +12     
  Branches      187      191       +4     
==========================================
+ Hits         1082     1093      +11     
  Misses        183      183              
- Partials       41       42       +1     
Impacted Files Coverage Δ
src/pytest_mock_resources/fixture/credentials.py 100.00% <ø> (ø)
src/pytest_mock_resources/sqlalchemy.py 92.71% <90.90%> (ø)
src/pytest_mock_resources/__init__.py 100.00% <100.00%> (ø)
src/pytest_mock_resources/fixture/__init__.py 100.00% <100.00%> (ø)
src/pytest_mock_resources/fixture/base.py 100.00% <100.00%> (ø)
src/pytest_mock_resources/fixture/mongo.py 100.00% <100.00%> (ø)
src/pytest_mock_resources/fixture/mysql.py 94.44% <100.00%> (ø)
src/pytest_mock_resources/fixture/postgresql.py 94.93% <100.00%> (ø)
src/pytest_mock_resources/fixture/redis.py 76.92% <100.00%> (ø)
...pytest_mock_resources/fixture/redshift/__init__.py 79.48% <100.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

oakhan3 commented 2 years ago

This could be breaking for some, could you bump the version?