Skip to content

Commit 53cecb6

Browse files
committed
Remove str() wrapping on Path objects in tests
open() accepts Path objects directly since Python 3.6. Remove the unnecessary str() conversion in test_get_host_success and test_get_host_404. Closes #33
1 parent bb58db9 commit 53cecb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_accept_header(self):
6565
class TestGetHost:
6666
def test_get_host_success(self, client):
6767
for f in HOSTS_SUCCESS_RESULTS_DIR.iterdir():
68-
with open(str(f)) as ff:
68+
with open(f) as ff:
6969
res_json = json.load(ff)
7070
ipv4 = f.name[:-5] # remove .json
7171
with requests_mock.Mocker() as m:
@@ -78,7 +78,7 @@ def test_get_host_success(self, client):
7878

7979
def test_get_host_404(self, client):
8080
for f in HOSTS_404_RESULTS_DIR.iterdir():
81-
with open(str(f)) as ff:
81+
with open(f) as ff:
8282
res_json = json.load(ff)
8383
ipv4 = f.name[:-5] # remove .json
8484
with requests_mock.Mocker() as m:

0 commit comments

Comments
 (0)