From 209aac3e842c50273cab2527235aad7aa2e6f529 Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Mon, 12 Feb 2024 17:13:50 +0100 Subject: [PATCH] black: format code with black version 24.1 Adding skip fmt to avoid issues with black < 24. New rule added in black 24 is: > If an assignment statement is too long, we now prefer splitting on the right-hand side > https://github.com/psf/black/pull/3368 --- fluster/test.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fluster/test.py b/fluster/test.py index 49eaaa5..6df333f 100644 --- a/fluster/test.py +++ b/fluster/test.py @@ -58,9 +58,9 @@ def __init__( def _test(self) -> None: if self.skip: - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.NOT_RUN + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.NOT_RUN + ) # fmt: skip return @@ -89,17 +89,17 @@ def _test(self) -> None: perf_counter() - start ) except TimeoutExpired: - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.TIMEOUT + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.TIMEOUT + ) # fmt: skip self.test_suite.test_vectors[self.test_vector.name].test_time = ( perf_counter() - start ) raise except Exception: - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.ERROR + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.ERROR + ) # fmt: skip self.test_suite.test_vectors[self.test_vector.name].test_time = ( perf_counter() - start ) @@ -113,20 +113,20 @@ def _test(self) -> None: os.remove(output_filepath) if not self.reference: - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.FAIL + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.FAIL + ) # fmt: skip if self.test_vector.result.lower() == result.lower(): - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.SUCCESS + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.SUCCESS + ) # fmt: skip self.assertEqual( self.test_vector.result.lower(), result.lower(), self.test_vector.name, ) else: - self.test_suite.test_vectors[ - self.test_vector.name - ].test_result = TestVectorResult.REFERENCE + self.test_suite.test_vectors[self.test_vector.name].test_result = ( + TestVectorResult.REFERENCE + ) # fmt: skip self.test_suite.test_vectors[self.test_vector.name].result = result