xflr6 / graphviz

Simple Python interface for Graphviz
https://graphviz.readthedocs.io
MIT License
1.65k stars 213 forks source link

Replace tmpdir with tmp_path in tests #126

Closed eumiro closed 3 years ago

eumiro commented 3 years ago

As discussed in #125, this replaces tmpdir with tmp_path in all tests (and tmpdir_factory with tmp_path_factory), because the py.path used as tmpdir is in maintenance mode and pytest is also migrating to tmp_path.

This adds some code though because py.path had special functions for almost everything and here they have to be supplied with os and shutil.

Next step would be replacing all os.path/glob/open calls in the main code with pathlib.Path.

codecov-io commented 3 years ago

Codecov Report

Merging #126 (f685b43) into master (4ebb566) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #126   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          466       467    +1     
=========================================
+ Hits           466       467    +1     
Impacted Files Coverage Δ
graphviz/tools.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 4ebb566...fba09fa. Read the comment docs.

eumiro commented 3 years ago

Thank your for the review, everything updated. Should I squash it to a single commit or do you want to do it in the merge?

eumiro commented 3 years ago

@xflr6 thank you for the review, I have committed your latest notes as well and squashed to a single commit with a longer description.