We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f628f8f commit 56c0083Copy full SHA for 56c0083
1 file changed
Lib/test/test_shutil.py
@@ -1127,13 +1127,13 @@ def _assert_are_the_same_file_is_raised(self):
1127
with self.assertRaises(Error) as cm:
1128
yield
1129
1130
- self.assertEqual(len(cm.exception.args[0]), 1)
+ errors = cm.exception.args[0]
1131
+ self.assertEqual(len(errors), 1)
1132
+ _, _, why = errors[0]
1133
if sys.platform == "win32":
- self.assertIn(
- "it is being used by another process", cm.exception.args[0][0][2]
1134
- )
+ self.assertIn("it is being used by another process", why)
1135
else:
1136
- self.assertIn("are the same file", cm.exception.args[0][0][2])
+ self.assertIn("are the same file", why)
1137
1138
1139
class TestCopy(BaseTest, unittest.TestCase):
0 commit comments