Skip to content

Commit

Permalink
Skip exec bit test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrv committed Jul 10, 2024
1 parent 8385900 commit 723fb16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/unit/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ def test_executable(self):
for suffix in (None, "sh", "bat"):
with self.subTest(suffix=suffix):
res = ExecutableResolver([self.res1], code="code1", module="module1", suffix=suffix)
self.assertNotIn("versionnonexec", res.available_versions,
"ExecutableResolver must not list scripts that are not executable.")
if os.name != "nt":
# no exec bits are present on windows it seems
self.assertNotIn("versionnonexec", res.available_versions,
"ExecutableResolver must not list scripts that are not executable.")
self.assertNotIn("wrong_format", res.available_versions,
"ExecutableResolver must not list scripts that do not follow the correct format.")
"ExecutableResolver must not list scripts that do not follow the correct format.")
self.assertEqual("version1", res.default_version,
"default version should be chosen in alphabetical order if not explicitly set.")
res = ExecutableResolver([self.res1], code="code2", module="module1", suffix=suffix)
Expand Down

0 comments on commit 723fb16

Please sign in to comment.