diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-26 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 12:45:07 +0100 |
| commit | 305757aec19c9d5111e4d76095ae0acd66163e4b (patch) | |
| tree | 04aa017e66c06b3b19cb466ed4e1d73cd871523d /tests/files/tests.py | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/files/tests.py')
| -rw-r--r-- | tests/files/tests.py | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/tests/files/tests.py b/tests/files/tests.py index 7dc5c04668..9d3a471cb3 100644 --- a/tests/files/tests.py +++ b/tests/files/tests.py @@ -144,35 +144,40 @@ class FileTests(unittest.TestCase): self.assertEqual(list(f), ["one\n", "two\n", "three"]) def test_readable(self): - with tempfile.TemporaryFile() as temp, File( - temp, name="something.txt" - ) as test_file: + with ( + tempfile.TemporaryFile() as temp, + File(temp, name="something.txt") as test_file, + ): self.assertTrue(test_file.readable()) self.assertFalse(test_file.readable()) def test_writable(self): - with tempfile.TemporaryFile() as temp, File( - temp, name="something.txt" - ) as test_file: + with ( + tempfile.TemporaryFile() as temp, + File(temp, name="something.txt") as test_file, + ): self.assertTrue(test_file.writable()) self.assertFalse(test_file.writable()) - with tempfile.TemporaryFile("rb") as temp, File( - temp, name="something.txt" - ) as test_file: + with ( + tempfile.TemporaryFile("rb") as temp, + File(temp, name="something.txt") as test_file, + ): self.assertFalse(test_file.writable()) def test_seekable(self): - with tempfile.TemporaryFile() as temp, File( - temp, name="something.txt" - ) as test_file: + with ( + tempfile.TemporaryFile() as temp, + File(temp, name="something.txt") as test_file, + ): self.assertTrue(test_file.seekable()) self.assertFalse(test_file.seekable()) def test_io_wrapper(self): content = "vive l'été\n" - with tempfile.TemporaryFile() as temp, File( - temp, name="something.txt" - ) as test_file: + with ( + tempfile.TemporaryFile() as temp, + File(temp, name="something.txt") as test_file, + ): test_file.write(content.encode()) test_file.seek(0) wrapper = TextIOWrapper(test_file, "utf-8", newline="\n") |
