Merge pull request #4545 from thuanquang/test/tools-python39-hard-links
test(tools): create hard links with os.link for Python 3.9
This commit is contained in:
commit
c02df171c8
|
|
@ -1,6 +1,7 @@
|
|||
import contextlib
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import struct
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
@ -421,7 +422,7 @@ class ImportAuditTests(unittest.TestCase):
|
|||
registry = work.root / "game.json"
|
||||
write_registry(registry, [("AAAAAAAAAAA", "libSceA.prx")])
|
||||
output = work.root / "hard-link.json"
|
||||
output.hardlink_to(registry)
|
||||
os.link(registry, output)
|
||||
before = registry.read_bytes()
|
||||
code, out, err = work.run(registry, "--json", str(output))
|
||||
self.assertEqual((code, out), (2, ""))
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class StubGeneratorTests(unittest.TestCase):
|
|||
nids.write_text("AAAAAAAAAAA\n", encoding="utf-8")
|
||||
original = "AAAAAAAAAAA sceExample\n"
|
||||
database.write_text(original, encoding="utf-8")
|
||||
output.hardlink_to(database)
|
||||
os.link(database, output)
|
||||
arguments = ["--module", "libSceExample", "--nids", str(nids), "--db", str(database), "--out", str(output)]
|
||||
with contextlib.redirect_stderr(io.StringIO()), self.assertRaises(SystemExit) as error:
|
||||
stubgen.main(arguments)
|
||||
|
|
|
|||
Loading…
Reference in New Issue