diff --git a/coxeter/__init__.py b/coxeter/__init__.py index 5c3a0ac6..6ccb9fc9 100644 --- a/coxeter/__init__.py +++ b/coxeter/__init__.py @@ -21,4 +21,4 @@ from . import families, io, shapes from .shape_getters import from_gsd_type_shapes -__all__ = ["families", "shapes", "from_gsd_type_shapes", "io"] \ No newline at end of file +__all__ = ["families", "shapes", "from_gsd_type_shapes", "io"] diff --git a/coxeter/io.py b/coxeter/io.py index 1ebba2c1..3bc6c6ec 100644 --- a/coxeter/io.py +++ b/coxeter/io.py @@ -12,9 +12,10 @@ import os from copy import deepcopy -from importlib.metadata import version from xml.etree import ElementTree + import numpy as np + from coxeter import __version__ diff --git a/tests/test_io.py b/tests/test_io.py index f5f64253..5e588a09 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.readlines(), file2.readlines() assert file1_contents == file2_contents