From 80ab186e327e31d296d51b4e81523faae2c94df5 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 11 Dec 2019 21:40:37 +0100 Subject: [PATCH] Tests: replace two mode= uses with text= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The text=… argument is supported more widely (e.g. FreeBSD doesn't support mode), so let's use that in tests for better coverage on multiple platforms. --- tests/test_acls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_acls.py b/tests/test_acls.py index 55ba9e1..8234c5c 100644 --- a/tests/test_acls.py +++ b/tests/test_acls.py @@ -40,6 +40,7 @@ from posix1e import * TEST_DIR = os.environ.get("TEST_DIR", ".") BASIC_ACL_TEXT = "u::rw,g::r,o::-" +TEXT_0755 = "u::rwx,g::rx,o::rx" # Permset permission information PERMSETS = [ @@ -315,13 +316,13 @@ class TestLoad: assert acl1.valid() acl1.__init__(text=BASIC_ACL_TEXT) # type: ignore assert acl1.valid() - acl2 = ACL(mode=0o755) + acl2 = ACL(text=TEXT_0755) assert acl1 != acl2 acl1.__init__(acl=acl2) # type: ignore assert acl1 == acl2 def test_entry_reinit_failure_noop(self): - a = posix1e.ACL(mode=0o0755) + a = posix1e.ACL(text=TEXT_0755) b = posix1e.ACL(acl=a) assert a == b with pytest.raises(IOError): -- 2.39.5