mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Bump Ruff to 0.6.7 (#124384)
This commit is contained in:
parent
6425443e1d
commit
67aa68f1b4
8 changed files with 11 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue