From fa10da73cc2a12b8dec28701c98f820c7ab8dfab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:12:58 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_io.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_io.py b/tests/test_io.py index 5582a101..816a66e9 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -6,17 +6,19 @@ # This software is licensed under the BSD 3-Clause License. """Regression tests for the I/O module.""" -import filecmp import tempfile from pathlib import Path -from coxeter import io -from coxeter.shapes import Polyhedron, ConvexPolyhedron + import pytest +from coxeter import io +from coxeter.shapes import ConvexPolyhedron, Polyhedron + + def compare_text_files(file_path_1, file_path_2): - """Check whether two text files have identical contents, ignoring different + """Check whether two text files have identical contents, ignoring different newline characters.""" - with open(file_path_1, "r") as file1, open(file_path_2, "r") as file2: + with open(file_path_1) as file1, open(file_path_2) as file2: file1_contents, file2_contents = file1.read(), file2.read() return file1_contents == file2_contents