[3.13] Bump Ruff to 0.6.7 (#124384) (#124389)

Bump Ruff to 0.6.7 (#124384)
This commit is contained in:
Alex Waygood 2024-09-30 02:04:56 +01:00 committed by GitHub
parent 6425443e1d
commit 67aa68f1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 14 deletions

View file

@ -444,12 +444,10 @@ class FileContextTestCase(unittest.TestCase):
def testWithOpen(self):
tfn = tempfile.mktemp()
try:
f = None
with open(tfn, "w", encoding="utf-8") as f:
self.assertFalse(f.closed)
f.write("Booh\n")
self.assertTrue(f.closed)
f = None
with self.assertRaises(ZeroDivisionError):
with open(tfn, "r", encoding="utf-8") as f:
self.assertFalse(f.closed)