From c196256a0f24d43bc45afb4c2d88b2b1a0008f37 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Tue, 4 Oct 2022 18:15:16 +0200 Subject: [PATCH] tests: Fix test_multiline_formatter This test fails with the latest version of flake8 because it tries to write to sys.stdout.buffer and the OutputCapture by default uses StringIO. This patch changes this specific test to use files instead. --- run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 95f5c28..9c5e911 100644 --- a/run_tests.py +++ b/run_tests.py @@ -62,7 +62,7 @@ def test_multiline_formatter(self): '% (\'world\'))', ])) app = application.Application() - with OutputCapture() as output: + with OutputCapture(fd=True) as output: app.run([file_path, ]) self.assertIn(