diff --git a/tests/test_cbook.py b/tests/test_cbook.py index 8c46692c..91113bb7 100644 --- a/tests/test_cbook.py +++ b/tests/test_cbook.py @@ -3,8 +3,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import os.path import re diff --git a/tests/test_collections.py b/tests/test_collections.py index 9877a7d4..120efb3f 100644 --- a/tests/test_collections.py +++ b/tests/test_collections.py @@ -4,10 +4,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - -import six - import pytest import gromacs diff --git a/tests/test_config.py b/tests/test_config.py index 10b42686..641e7a29 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -3,17 +3,12 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import contextlib import os import errno import sys -if sys.version_info[0] < 3: - from ConfigParser import NoOptionError, NoSectionError -else: - from configparser import NoOptionError, NoSectionError +from configparser import NoOptionError, NoSectionError import pytest diff --git a/tests/test_core.py b/tests/test_core.py index f24ec54b..7741f64c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -4,10 +4,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - -import six - import os.path import pytest @@ -73,10 +69,7 @@ def test_run_with_input(self, command, inp): def test_Popen_with_input(self, command, inp): po = command.Popen(stdout=False, stderr=False, input=inp) inp_string = "\n".join(gromacs.utilities.asiterable(inp)) + "\n" - if six.PY2: - assert po.input == inp_string.encode("utf-8") - else: - assert po.input == inp_string + assert po.input == inp_string def test_help_short(self, command, capsys): command.help() diff --git a/tests/test_run.py b/tests/test_run.py index 12dd64ca..95041dd2 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -3,8 +3,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import time import pytest import os diff --git a/tests/test_setup.py b/tests/test_setup.py index 6c657ef9..ba2cfbd6 100644 --- a/tests/test_setup.py +++ b/tests/test_setup.py @@ -3,8 +3,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import os.path import pytest @@ -68,7 +66,7 @@ def energy_minimize(solvate, low_performance): integrator="steep", emtol=5000, maxwarn=1, - **solvate_args + **solvate_args, ) return TMPDIR, em_args diff --git a/tests/test_tools.py b/tests/test_tools.py index e06557bb..e85318b9 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -3,8 +3,6 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import pytest import gromacs diff --git a/tests/test_utilities.py b/tests/test_utilities.py index a06cd2e3..5a9475e7 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -3,13 +3,11 @@ # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. -from __future__ import division, absolute_import, print_function - import os.path import pytest -from six.moves import cPickle as pickle -from six.moves import StringIO -from six.moves.collections_abc import Iterable +import pickle +from io import StringIO +from collections.abc import Iterable import numpy as np diff --git a/tests/test_version.py b/tests/test_version.py index a067b85d..b03d9858 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -13,8 +13,8 @@ def test_version(): release = gromacs.__version__ assert isinstance(release, str) + def test_version_pep440_like(): release = gromacs.__version__ match = re.match(r"\d+\.\d+\.\d+", release) assert match, f"Version {release} does not look like MAJOR.MINOR.PATCH..." -