diff --git a/setup.py b/setup.py index b830492..03ee47a 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,15 @@ from setuptools import setup, find_packages install_requires = ["execnet>=1.1", "pytest>=3.6.0", "pytest-forked", "six"] +with open("README.rst") as f: + long_description = f.read() + setup( name="pytest-xdist", use_scm_version={"write_to": "xdist/_version.py"}, description="pytest xdist plugin for distributed testing" " and loop-on-failing modes", - long_description=open("README.rst").read(), + long_description=long_description, license="MIT", author="holger krekel and contributors", author_email="pytest-dev@python.org,holger@merlinux.eu", diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index e0d4770..9a8e42b 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -490,9 +490,8 @@ def test_session_hooks(testdir): name = "worker" else: name = "master" - f = open(name, "w") - f.write("xy") - f.close() + with open(name, "w") as f: + f.write("xy") # let's fail on the worker if name == "worker": raise ValueError(42) diff --git a/testing/test_remote.py b/testing/test_remote.py index 42b28a7..649739f 100644 --- a/testing/test_remote.py +++ b/testing/test_remote.py @@ -153,7 +153,6 @@ class TestReportSerialization: for i in range(len(a_entries)): assert isinstance(rep_entries[i], ReprEntry) assert rep_entries[i].lines == a_entries[i].lines - assert rep_entries[i].localssep == a_entries[i].localssep assert rep_entries[i].reprfileloc.lineno == a_entries[i].reprfileloc.lineno assert ( rep_entries[i].reprfileloc.message == a_entries[i].reprfileloc.message