Skip to content

Commit 88018bf

Browse files
committed
Improve code formatting
1 parent b7ecc10 commit 88018bf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

setuptools/tests/test_egg_info.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,16 @@ def test_expected_files_produced(self, tmpdir_cwd, env):
162162
def test_handling_utime_error(self, tmpdir_cwd, env):
163163
dist = Distribution()
164164
ei = egg_info(dist)
165-
with mock.patch('os.utime', side_effect=OSError("TEST")),\
166-
mock.patch('setuptools.command.egg_info.egg_info.mkpath', return_val=None):
165+
utime_patch = mock.patch('os.utime', side_effect=OSError("TEST"))
166+
mkpath_patch = mock.patch(
167+
'setuptools.command.egg_info.egg_info.mkpath', return_val=None
168+
)
169+
170+
with utime_patch, mkpath_patch:
167171
import distutils.errors
168-
with pytest.raises(distutils.errors.DistutilsFileError, match =
169-
r"Cannot update time stamp of directory 'None'"):
172+
173+
msg = r"Cannot update time stamp of directory 'None'"
174+
with pytest.raises(distutils.errors.DistutilsFileError, match=msg):
170175
ei.run()
171176

172177
def test_license_is_a_string(self, tmpdir_cwd, env):

0 commit comments

Comments
 (0)