test: 修复跨平台临时路径比较并触发 Python 改动测试
This commit is contained in:
1 parent
09be466e9e
commit
2295750008
4 files changed
+5
-3
No files matched your search
@@ -5,6 +5,7 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- "**/*.rs"
|
||||
- "scripts/**/*.py"
|
||||
- "**/Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "rust-toolchain.toml"
|
||||
@@ -12,6 +13,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.rs"
|
||||
- "scripts/**/*.py"
|
||||
- "**/Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "rust-toolchain.toml"
|
||||
|
||||
@@ -139,7 +139,7 @@ class ArchiveSafetyTests(unittest.TestCase):
|
||||
|
||||
def test_macos_bundle_resolves_declared_executable_and_rejects_other_paths(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory) / "Pebrel Preview.app"
|
||||
root = Path(directory).resolve() / "Pebrel Preview.app"
|
||||
binary = root / "Contents" / "MacOS" / "pebrel"
|
||||
binary.parent.mkdir(parents=True)
|
||||
binary.write_bytes(b"fixture")
|
||||
|
||||
@@ -13,7 +13,7 @@ class LineBudgetTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.temporary = tempfile.TemporaryDirectory()
|
||||
self.addCleanup(self.temporary.cleanup)
|
||||
self.root = Path(self.temporary.name)
|
||||
self.root = Path(self.temporary.name).resolve()
|
||||
(self.root / "app/src").mkdir(parents=True)
|
||||
|
||||
def write(self, name, count):
|
||||
|
||||
@@ -18,7 +18,7 @@ class XplatIsolationTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.temp = tempfile.TemporaryDirectory(prefix="nebula-xplat-test-")
|
||||
self.addCleanup(self.temp.cleanup)
|
||||
self.root = Path(self.temp.name)
|
||||
self.root = Path(self.temp.name).resolve()
|
||||
self.repo = self.root / "repo with spaces"
|
||||
self.scripts = self.repo / "scripts/xplat"
|
||||
shutil.copytree(ROOT / "scripts/xplat", self.scripts)
|
||||
|
||||
Reference in new issue
Block a user