Skip to content

Commit 1967ab7

Browse files
committed
fixup! Respect PURE_PYTHON=0 environment variable
1 parent 35eed29 commit 1967ab7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/AccessControl/tests/testSecurityManager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import os
1818
import unittest
1919

20+
from ..Implementation import PURE_PYTHON
21+
2022

2123
_THREAD_ID = 123
2224

@@ -251,8 +253,7 @@ def _getTargetClass(self):
251253
return SecurityManager
252254

253255

254-
@unittest.skipIf(int(os.environ.get('PURE_PYTHON', '0')),
255-
reason="Test expects C impl.")
256+
@unittest.skipIf(PURE_PYTHON, reason="Test expects C impl.")
256257
class C_SecurityManagerTests(SecurityManagerTestBase,
257258
ISecurityManagerConformance,
258259
unittest.TestCase):

src/AccessControl/tests/testZopeSecurityPolicy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from AccessControl.SecurityManagement import SecurityContext
2828
from AccessControl.userfolder import UserFolder
2929

30+
from ..Implementation import PURE_PYTHON
31+
3032

3133
user_roles = ('RoleOfUser',)
3234
eo_roles = ('RoleOfExecutableOwner',)
@@ -772,7 +774,7 @@ def test_suite():
772774
unittest.defaultTestLoader.loadTestsFromTestCase(Python_ZSPTests))
773775
suite.addTest(
774776
unittest.defaultTestLoader.loadTestsFromTestCase(Python_SMTests))
775-
if not int(os.environ.get('PURE_PYTHON', '0')):
777+
if not PURE_PYTHON:
776778
suite.addTest(
777779
unittest.defaultTestLoader.loadTestsFromTestCase(C_ZSPTests))
778780
suite.addTest(

0 commit comments

Comments
 (0)