From ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1 Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Sat, 11 Mar 2023 06:46:20 +0000 Subject: Format codebase with black and check formatting in CQ Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger Tested-by: Gavin Mak Commit-Queue: Gavin Mak --- tests/test_editor.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'tests/test_editor.py') diff --git a/tests/test_editor.py b/tests/test_editor.py index cfd4f5ed..8f5d160e 100644 --- a/tests/test_editor.py +++ b/tests/test_editor.py @@ -20,37 +20,37 @@ from editor import Editor class EditorTestCase(unittest.TestCase): - """Take care of resetting Editor state across tests.""" + """Take care of resetting Editor state across tests.""" - def setUp(self): - self.setEditor(None) + def setUp(self): + self.setEditor(None) - def tearDown(self): - self.setEditor(None) + def tearDown(self): + self.setEditor(None) - @staticmethod - def setEditor(editor): - Editor._editor = editor + @staticmethod + def setEditor(editor): + Editor._editor = editor class GetEditor(EditorTestCase): - """Check GetEditor behavior.""" + """Check GetEditor behavior.""" - def test_basic(self): - """Basic checking of _GetEditor.""" - self.setEditor(':') - self.assertEqual(':', Editor._GetEditor()) + def test_basic(self): + """Basic checking of _GetEditor.""" + self.setEditor(":") + self.assertEqual(":", Editor._GetEditor()) class EditString(EditorTestCase): - """Check EditString behavior.""" + """Check EditString behavior.""" - def test_no_editor(self): - """Check behavior when no editor is available.""" - self.setEditor(':') - self.assertEqual('foo', Editor.EditString('foo')) + def test_no_editor(self): + """Check behavior when no editor is available.""" + self.setEditor(":") + self.assertEqual("foo", Editor.EditString("foo")) - def test_cat_editor(self): - """Check behavior when editor is `cat`.""" - self.setEditor('cat') - self.assertEqual('foo', Editor.EditString('foo')) + def test_cat_editor(self): + """Check behavior when editor is `cat`.""" + self.setEditor("cat") + self.assertEqual("foo", Editor.EditString("foo")) -- cgit v1.2.3-54-g00ecf