]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-114107: Fix importlib.resources symlink test if symlinks aren't supported (#114108)
authorPetr Viktorin <encukou@gmail.com>
Tue, 16 Jan 2024 15:10:03 +0000 (16:10 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Jan 2024 15:10:03 +0000 (16:10 +0100)
gh-114107: Fix symlink test if symlinks aren't supported

Lib/test/test_importlib/test_main.py

index 1d3817151edf640303bdab14e3ae2a992080382e..0a769b898412340a3e2ff17fb21d403b26b96474 100644 (file)
@@ -4,6 +4,7 @@ import unittest
 import warnings
 import importlib.metadata
 import contextlib
+from test.support import os_helper
 
 try:
     import pyfakefs.fake_filesystem_unittest as ffs
@@ -403,6 +404,7 @@ class PackagesDistributionsTest(
 
         assert not any(name.endswith('.dist-info') for name in distributions)
 
+    @os_helper.skip_unless_symlink
     def test_packages_distributions_symlinked_top_level(self) -> None:
         """
         Distribution is resolvable from a simple top-level symlink in RECORD.