kevin1024 / vcrpy

Automatically mock your HTTP interactions to simplify and speed up testing
MIT License
2.72k stars 388 forks source link

Add Path handling vcrpy #658

Closed 07pepa closed 2 years ago

07pepa commented 2 years ago
codecov-commenter commented 2 years ago

Codecov Report

Merging #658 (3fdc910) into master (f3f6608) will decrease coverage by 0.37%. The diff coverage is 90.47%.

@@            Coverage Diff             @@
##           master     #658      +/-   ##
==========================================
- Coverage   89.85%   89.47%   -0.38%     
==========================================
  Files          27       26       -1     
  Lines        1734     1730       -4     
  Branches      285      257      -28     
==========================================
- Hits         1558     1548      -10     
- Misses        140      146       +6     
  Partials       36       36              
Impacted Files Coverage Δ
vcr/persisters/filesystem.py 91.30% <85.71%> (-8.70%) :arrow_down:
vcr/config.py 95.03% <100.00%> (+0.03%) :arrow_up:
vcr/serializers/yamlserializer.py 77.77% <0.00%> (-22.23%) :arrow_down:
vcr/migration.py 74.48% <0.00%> (-2.05%) :arrow_down:
vcr/__init__.py

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jairhenrique commented 2 years ago

@07pepa can you fix the lint error.

  lint run-test: commands[1] | black --check --diff .
  --- tests/unit/test_vcr.py    2022-10-09 13:55:56.205379 +0000
  +++ tests/unit/test_vcr.py    2022-10-09 13:56:18.955592 +0000
  @@ -363,7 +363,8 @@
   del test_dynamically_added

   def test_path_class_as_cassette():
       with use_cassette(
  -            Path(__file__).parent.parent.joinpath("integration/cassettes/test_httpx_test_test_behind_proxy.yml")):
  +        Path(__file__).parent.parent.joinpath("integration/cassettes/test_httpx_test_test_behind_proxy.yml")
  +    ):
           pass
  would reformat tests/unit/test_vcr.py

  Oh no! 💥 💔 💥
  1 file would be reformatted, 70 files would be left unchanged.
  Error: ERROR: InvocationError for command /home/runner/work/vcrpy/vcrpy/.tox/lint/bin/black --check --diff . (exited with code 1)
07pepa commented 2 years ago

will do

07pepa commented 2 years ago

fixed please merge

jairhenrique commented 2 years ago

@07pepa please, rebase your branch with master, I'll do the merge after that.

07pepa commented 2 years ago

rebased

Thanks

jairhenrique commented 2 years ago

Thanks.