Skip to content

Commit 8a821d3

Browse files
Keep logo hardlink regression on the asset filesystem
1 parent 4b96921 commit 8a821d3

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎test_io.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@ def test_default_logo_and_checker_protected(self):
191191
self.assertEqual(2,self.invoke("--component","brotli=1.2.1","--output",str(path),"--force",*options)[0])
192192
self.assertEqual(before,path.read_bytes())
193193
bundled=Path(c.__file__).parent/"assets"/"logo.png"
194-
alias=self.root/"bundled-alias.png"
195-
alias.hardlink_to(bundled)
196-
before=bundled.read_bytes()
197-
self.assertEqual(2,self.invoke("--component","brotli=1.2.1","--brand","Other Organization","--output",str(alias),"--force")[0])
198-
self.assertEqual(before,bundled.read_bytes())
194+
with tempfile.TemporaryDirectory(dir=bundled.parent) as alias_dir:
195+
alias=Path(alias_dir)/"bundled-alias.png"
196+
alias.hardlink_to(bundled)
197+
before=bundled.read_bytes()
198+
self.assertEqual(2,self.invoke("--component","brotli=1.2.1","--brand","Other Organization","--output",str(alias),"--force")[0])
199+
self.assertEqual(before,bundled.read_bytes())
199200

200201
def test_logo_validation_and_missing_output_parent(self):
201202
bad=self.root/"bad.png"

0 commit comments

Comments
 (0)