Stranger6667 / hypothesis-graphql

Generate arbitrary queries matching your GraphQL schema, and use them to verify your backend implementation.
https://pypi.org/project/hypothesis-graphql/
MIT License
44 stars 2 forks source link

chore: Cache parsed schemas #54

Closed Stranger6667 closed 2 years ago

Stranger6667 commented 2 years ago

Parsed results depend only on the input string, so caching should be safe. This change dramatically helps with tests duration

codecov[bot] commented 2 years ago

Codecov Report

Merging #54 (8e8134c) into master (72b71dc) will increase coverage by 0.26%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   98.30%   98.57%   +0.26%     
==========================================
  Files           5       11       +6     
  Lines         236      280      +44     
  Branches       49       51       +2     
==========================================
+ Hits          232      276      +44     
  Misses          4        4              
Flag Coverage Δ
unittests 98.57% <100.00%> (+0.26%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/hypothesis_graphql/_strategies/ast.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/_strategies/context.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/_strategies/mutations.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/_strategies/queries.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/_strategies/selections.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/_strategies/validation.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/cache.py 100.00% <100.00%> (ø)
src/hypothesis_graphql/strategies.py 100.00% <100.00%> (ø)

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 0042f5c...8e8134c. Read the comment docs.