From 537659325664b47b01c24e82cb4a0e850cd129c0 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 9 Feb 2021 17:44:04 +0100 Subject: Modernize Python syntax with pyupgrade --py38-plus **/*.py --- tests/test_transform.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/test_transform.py') diff --git a/tests/test_transform.py b/tests/test_transform.py index 927c13b..c5e189b 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -7,7 +7,7 @@ from fatcat_scholar.transform import * def test_es_release_from_release() -> None: - with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json", "r") as f: + with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json") as f: release = entity_from_json(f.read(), ReleaseEntity) obj = es_release_from_release(release) @@ -20,7 +20,7 @@ def test_es_release_from_release() -> None: def test_es_biblio_from_release() -> None: - with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json", "r") as f: + with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json") as f: release = entity_from_json(f.read(), ReleaseEntity) obj = es_biblio_from_release(release) @@ -36,16 +36,16 @@ def test_es_biblio_from_release() -> None: def test_run_refs() -> None: - with open("tests/files/work_iarm6swodra2bcrzhxrfaah7py_bundle.json", "r") as f: + with open("tests/files/work_iarm6swodra2bcrzhxrfaah7py_bundle.json") as f: run_refs(f.readlines()) def test_run_transform() -> None: - with open("tests/files/work_iarm6swodra2bcrzhxrfaah7py_bundle.json", "r") as f: + with open("tests/files/work_iarm6swodra2bcrzhxrfaah7py_bundle.json") as f: run_transform(f.readlines()) - with open("tests/files/sim_page_bundle.json", "r") as f: + with open("tests/files/sim_page_bundle.json") as f: run_transform(f.readlines()) -- cgit v1.2.3