summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-11 17:07:21 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-01-11 17:07:21 +0000
commit88018bf721916bb96dc39e9662fa3082b90598fb (patch)
tree7ff20e35ea3d3ec932de0a0ad74e5cd9950c4955
parentb7ecc106f72cdd98696086e9a90389a34dac7b14 (diff)
downloadpython-setuptools-git-88018bf721916bb96dc39e9662fa3082b90598fb.tar.gz
Improve code formatting
-rw-r--r--setuptools/tests/test_egg_info.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index cf4b6435..6a2a9893 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -162,11 +162,16 @@ class TestEggInfo:
def test_handling_utime_error(self, tmpdir_cwd, env):
dist = Distribution()
ei = egg_info(dist)
- with mock.patch('os.utime', side_effect=OSError("TEST")),\
- mock.patch('setuptools.command.egg_info.egg_info.mkpath', return_val=None):
+ utime_patch = mock.patch('os.utime', side_effect=OSError("TEST"))
+ mkpath_patch = mock.patch(
+ 'setuptools.command.egg_info.egg_info.mkpath', return_val=None
+ )
+
+ with utime_patch, mkpath_patch:
import distutils.errors
- with pytest.raises(distutils.errors.DistutilsFileError, match =
- r"Cannot update time stamp of directory 'None'"):
+
+ msg = r"Cannot update time stamp of directory 'None'"
+ with pytest.raises(distutils.errors.DistutilsFileError, match=msg):
ei.run()
def test_license_is_a_string(self, tmpdir_cwd, env):