Skip to content

Commit

Permalink
Fix acl_copy_int test naming and unhide a test
Browse files Browse the repository at this point in the history
All the tests were actually exercising `acl_copy_int()`, only the
feature flag is called ACL_COPY_EXT. Additionally, two separate tests
had sane function name, which was hiding the first of them.
  • Loading branch information
iustin committed Apr 24, 2023
1 parent 40894d1 commit 2ed39e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_acls.py
Expand Up @@ -548,14 +548,14 @@ def get_nulled_state(src=None):
return nulled

@require_copy_ext
def test_acl_copy_ext_failure(self):
def test_acl_copy_int_failure(self):
a = posix1e.ACL()
nulled = self.get_nulled_state(a)
with pytest.raises(IOError):
a.__setstate__(nulled)

@require_copy_ext
def test_acl_copy_ext_failure(self):
def test_acl_copy_int_failure_is_noop(self):
a = posix1e.ACL(text=BASIC_ACL_TEXT)
b = posix1e.ACL()
c = posix1e.ACL(acl=a)
Expand All @@ -569,21 +569,21 @@ def test_acl_copy_ext_failure(self):
assert a == c

@require_copy_ext
def test_acl_copy_ext_args(self):
def test_acl_copy_int_args(self):
a = posix1e.ACL()
with pytest.raises(TypeError):
a.__setstate__(None)

@require_copy_ext
def test_acl_init_copy_ext(self):
def test_acl_init_copy_int(self):
a = posix1e.ACL(text=BASIC_ACL_TEXT)
b = posix1e.ACL()
c = posix1e.ACL(data=a.__getstate__())
assert c != b
assert c == a

@require_copy_ext
def test_acl_init_copy_ext_invalid(self):
def test_acl_init_copy_int_invalid(self):
with pytest.raises(IOError):
posix1e.ACL(data=self.get_nulled_state())

Expand Down

0 comments on commit 2ed39e6

Please sign in to comment.