From 4bf3f994e696eae16405055f0a4d2d9aa1276a83 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 29 Nov 2021 16:02:32 +1000 Subject: [PATCH] Coding style. - Increase maximum line length from 80 to 100. --- eris/tests/__main___test.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/eris/tests/__main___test.py b/eris/tests/__main___test.py index 6bc1267..3e360e1 100755 --- a/eris/tests/__main___test.py +++ b/eris/tests/__main___test.py @@ -20,8 +20,7 @@ _DIMENSIONS = (100, 60) def _widget_to_string(widget, dimensions=_DIMENSIONS): - appearance = (widget.appearance_min() if dimensions is None - else widget.appearance(dimensions)) + appearance = widget.appearance_min() if dimensions is None else widget.appearance(dimensions) return str(fill3.join("\n", appearance)) @@ -31,8 +30,7 @@ def _touch(path): def _assert_widget_appearance(widget, golden_path, dimensions=_DIMENSIONS): golden_path_absolute = os.path.join(os.path.dirname(__file__), golden_path) - golden.assertGolden(_widget_to_string(widget, dimensions), - golden_path_absolute) + golden.assertGolden(_widget_to_string(widget, dimensions), golden_path_absolute) class _MockMainLoop: @@ -65,17 +63,14 @@ class ScreenWidgetTestCase(unittest.TestCase): _assert_widget_appearance(self.main_widget, "golden-files/help") def test_log_appearance(self): - _assert_widget_appearance(self.main_widget, - "golden-files/log-original") + _assert_widget_appearance(self.main_widget, "golden-files/log-original") self.main_widget.toggle_log() _assert_widget_appearance(self.main_widget, "golden-files/log") def test_window_orientation(self): - _assert_widget_appearance(self.main_widget, - "golden-files/window-orientation-original") + _assert_widget_appearance(self.main_widget, "golden-files/window-orientation-original") self.main_widget.toggle_window_orientation() - _assert_widget_appearance(self.main_widget, - "golden-files/window-orientation") + _assert_widget_appearance(self.main_widget, "golden-files/window-orientation") class SummaryCursorTest(unittest.TestCase): @@ -126,8 +121,7 @@ class SummarySyncWithFilesystemTestCase(unittest.TestCase): def callback(event): __main__.on_filesystem_event(event, self.summary, self.temp_dir) - __main__.setup_inotify(self.temp_dir, self.loop, callback, - __main__.is_path_excluded) + __main__.setup_inotify(self.temp_dir, self.loop, callback, __main__.is_path_excluded) _touch(self.foo_path) _touch(self.bar_path) self.log = __main__.Log() @@ -153,8 +147,7 @@ class SummarySyncWithFilesystemTestCase(unittest.TestCase): self.assertEqual(self.summary.result_total, result_total) max_width = max((len(row) for row in self.summary._entries), default=0) self.assertEqual(__main__.Entry.MAX_WIDTH, max_width) - max_path_length = max( - (len(row.path) - 2 for row in self.summary._entries), default=0) + max_path_length = max((len(row.path) - 2 for row in self.summary._entries), default=0) self.assertEqual(self.summary._max_path_length, max_path_length) def test_summary_initial_state(self): @@ -213,8 +206,7 @@ class MainTestCase(unittest.TestCase): __main__.manage_cache(root_path) with __main__.chdir(root_path): with contextlib.redirect_stdout(io.StringIO()): - __main__.main(root_path, loop, worker_count=2, - is_being_tested=True) + __main__.main(root_path, loop, worker_count=2, is_being_tested=True) for file_name in ["summary.pickle", "creation_time", "foo-metadata", "foo-contents"]: self.assertTrue(os.path.exists(".eris/" + file_name))