From c6e71b443b0a5a95857fc094e4ef44b748acb69e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 5 Jul 2023 20:57:59 -0700 Subject: [PATCH] move import --- tests/test_commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 47872d279..7759e38bb 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1,3 +1,4 @@ +import codecs import os import shutil import tempfile @@ -33,7 +34,6 @@ class TestCommands(TestCase): self.assertTrue(os.path.exists("foo.txt")) self.assertTrue(os.path.exists("bar.txt")) - import codecs def test_cmd_add_bad_encoding(self): # Initialize the Commands and InputOutput objects io = InputOutput(pretty=False, yes=True) @@ -43,8 +43,8 @@ class TestCommands(TestCase): commands = Commands(io, coder) # Create a new file foo.bad which will fail to decode as utf-8 - with codecs.open('foo.bad', 'w', encoding='iso-8859-15') as f: - f.write('ÆØÅ') # Characters not present in utf-8 + with codecs.open("foo.bad", "w", encoding="iso-8859-15") as f: + f.write("ÆØÅ") # Characters not present in utf-8 commands.cmd_add("foo.bad")