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

fix: Incompatilities with sqlalchemy 1.3. #155

Closed DanCardin closed 2 years ago

DanCardin commented 2 years ago

Prior refactorings seem to have broken compatibility with sqlalchemy 1.3 for postgres. This appears to largely be the singular sqlalchemy.engine.future import Connections import for type hints, which i removed.

The remainder of the changes are specific to problems that seem to be caused by tests between 1.3 and 1.4, and less so direct incompatibilities in the postgres code.

and the "failing" CI is just coverage decreasing, but that's only caused by uncovered lines between sqlalchemy versions.

codecov[bot] commented 2 years ago

Codecov Report

Merging #155 (dbdca54) into main (2feca11) will decrease coverage by 0.22%. The diff coverage is 70.00%.

@@            Coverage Diff             @@
##             main     #155      +/-   ##
==========================================
- Coverage   82.93%   82.71%   -0.23%     
==========================================
  Files          30       30              
  Lines        1301     1313      +12     
  Branches      185      185              
==========================================
+ Hits         1079     1086       +7     
- Misses        183      187       +4     
- Partials       39       40       +1     
Impacted Files Coverage Δ
...k_resources/fixture/database/relational/generic.py 92.89% <64.70%> (-2.27%) :arrow_down:
...esources/fixture/database/relational/postgresql.py 94.87% <100.00%> (ø)
...ck_resources/fixture/database/relational/sqlite.py 88.39% <100.00%> (+0.10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fb048fd...dbdca54. Read the comment docs.