unittests: skip test using symlink if not available

pull/5859/merge
Charles Brunet 1 year ago committed by Eli Schwartz
parent 64394fcbd6
commit 92592015bb
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 5
      unittests/allplatformstests.py

@ -4633,7 +4633,10 @@ class AllPlatformTests(BasePlatformTests):
symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject')
if not os.path.exists(subproject_dir):
os.mkdir(subproject_dir)
os.symlink(subproject, symlinked_subproject)
try:
os.symlink(subproject, symlinked_subproject)
except OSError:
raise SkipTest("Symlinks are not available on this machine")
self.addCleanup(os.remove, symlinked_subproject)
self.init(testdir)

Loading…
Cancel
Save