diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-28 10:44:25 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-28 10:44:25 +0100 |
| commit | 072edd76f8c6d567561c81a19b55a001bb5ea416 (patch) | |
| tree | 01c2ee330902b58e6d105a13207ea5bedd04f67d /tests/test_dbz.py | |
| parent | 1ef886da7e29aa619ab33e71c8136d87e40cdf37 (diff) | |
| download | generat3D-072edd76f8c6d567561c81a19b55a001bb5ea416.tar.gz generat3D-072edd76f8c6d567561c81a19b55a001bb5ea416.zip | |
Give .dbz files normal permissions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_dbz.py')
| -rw-r--r-- | tests/test_dbz.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_dbz.py b/tests/test_dbz.py index 2e5ffe8..3fbd7dc 100644 --- a/tests/test_dbz.py +++ b/tests/test_dbz.py @@ -20,6 +20,7 @@ import gzip import io import json import math +import os import tempfile import unittest from pathlib import Path @@ -94,3 +95,11 @@ class DbzTest(unittest.TestCase): doc = build(load(duf, Library([DATA / "lib"])), [DATA / "lib"]) fig = doc["figures"][0] self.assertEqual((fig["name"], fig["label"], fig["id"]), ("Alice", "Alice Label", "Fig")) + + def test_write_mode_follows_umask(self): + with tempfile.TemporaryDirectory() as d: + out = Path(d) / "s.dbz" + write(self.doc, out) + m = os.umask(0) + os.umask(m) + self.assertEqual(out.stat().st_mode & 0o777, 0o666 & ~m) |
