Skip to content

Commit

Permalink
fixup! Respect PURE_PYTHON=0 environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
perrinjerome committed Sep 30, 2024
1 parent 35eed29 commit 1967ab7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/AccessControl/tests/testSecurityManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import os
import unittest

from ..Implementation import PURE_PYTHON


_THREAD_ID = 123

Expand Down Expand Up @@ -251,8 +253,7 @@ def _getTargetClass(self):
return SecurityManager


@unittest.skipIf(int(os.environ.get('PURE_PYTHON', '0')),
reason="Test expects C impl.")
@unittest.skipIf(PURE_PYTHON, reason="Test expects C impl.")
class C_SecurityManagerTests(SecurityManagerTestBase,
ISecurityManagerConformance,
unittest.TestCase):
Expand Down
4 changes: 3 additions & 1 deletion src/AccessControl/tests/testZopeSecurityPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from AccessControl.SecurityManagement import SecurityContext
from AccessControl.userfolder import UserFolder

from ..Implementation import PURE_PYTHON


user_roles = ('RoleOfUser',)
eo_roles = ('RoleOfExecutableOwner',)
Expand Down Expand Up @@ -772,7 +774,7 @@ def test_suite():
unittest.defaultTestLoader.loadTestsFromTestCase(Python_ZSPTests))
suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(Python_SMTests))
if not int(os.environ.get('PURE_PYTHON', '0')):
if not PURE_PYTHON:
suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(C_ZSPTests))
suite.addTest(
Expand Down

0 comments on commit 1967ab7

Please sign in to comment.