diff --git a/tests/test_clean.py b/tests/test_clean.py index 8c6f901..0b85fce 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -3,21 +3,6 @@ import sys import pytest -# Python 2.7 on Windows does not have an `os.symlink()` function. -# PyPy on Windows raises NotImplementedError when `os.symlink()` is called. -# Older Python 3 versions on Windows require admin rights to create symlinks. -# -# In addition, functions like `os.path.realpath()` on Windows Pythons < 3.8 -# do not resolve symlinks and directory junctions correctly, -# and `shutil.rmtree()` will fail to delete directory junctions. -# -# For these reasons, if the tests are running on Windows with Python < 3.8 -# or with PyPy, the entire link test suite must be skipped. -# -if sys.platform[:5] == "win32" and (sys.version_info < (3, 8) or "pypy" in sys.version.lower()): - reason = "It is impossible to perform link tests on this platform" - pytestmark = pytest.mark.skip(reason=reason) - def test_clean_default(root, home, dotfiles, run_dotbot): """Verify clean uses default unless overridden.""" diff --git a/tests/test_link.py b/tests/test_link.py index 47d1051..dd6d085 100644 --- a/tests/test_link.py +++ b/tests/test_link.py @@ -3,21 +3,6 @@ import sys import pytest -# Python 2.7 on Windows does not have an `os.symlink()` function. -# PyPy on Windows raises NotImplementedError when `os.symlink()` is called. -# Older Python 3 versions on Windows require admin rights to create symlinks. -# -# In addition, functions like `os.path.realpath()` on Windows Pythons < 3.8 -# do not resolve symlinks and directory junctions correctly, -# and `shutil.rmtree()` will fail to delete directory junctions. -# -# For these reasons, if the tests are running on Windows with Python < 3.8 -# or with PyPy, the entire link test suite must be skipped. -# -if sys.platform[:5] == "win32" and (sys.version_info < (3, 8) or "pypy" in sys.version.lower()): - reason = "It is impossible to perform link tests on this platform" - pytestmark = pytest.mark.skip(reason=reason) - def test_link_canonicalization(home, dotfiles, run_dotbot): """Verify links to symlinked destinations are canonical. diff --git a/tox.ini b/tox.ini index f401e3e..752a2bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,20 @@ [tox] +; On Windows, only CPython >= 3.8 is supported. +; All older versions, and PyPy, lack full symlink support. envlist = - py{27, 35, 36, 37, 38, 39, 310} - pypy{2, 3} - py310-black - py310-isort + py{38, 39, 310}-all_platforms + py{27, 35, 36, 37}-most_platforms + pypy{2, 3}-most_platforms + py39-black + py39-isort skip_missing_interpreters = true [testenv] +platform = + all_platforms: cygwin|darwin|linux|win32 + most_platforms: cygwin|darwin|linux + deps = pytest pytest-randomly @@ -18,7 +25,7 @@ commands = pytest tests/ -[testenv:py310-black] +[testenv:py39-black] skip_install = true skip_build = true deps = @@ -28,7 +35,7 @@ commands = black --check dotbot/ tests/ -[testenv:py310-isort] +[testenv:py39-isort] skip_install = true skip_build = true deps =