Skip to content

Commit

Permalink
Respect PURE_PYTHON=0 environment variable
Browse files Browse the repository at this point in the history
Setting to 0 should be equivalent to not setting the variable.

Refs zopefoundation/meta#283
  • Loading branch information
perrinjerome committed Sep 30, 2024
1 parent 4779653 commit f7f1adf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AccessControl/tests/testSecurityManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _getTargetClass(self):
return SecurityManager


@unittest.skipIf(os.environ.get('PURE_PYTHON'), reason="Test expects C impl.")
@unittest.skipIf(int(os.environ.get('PURE_PYTHON', '0')), reason="Test expects C impl.")
class C_SecurityManagerTests(SecurityManagerTestBase,
ISecurityManagerConformance,
unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion src/AccessControl/tests/testZopeSecurityPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def test_suite():
unittest.defaultTestLoader.loadTestsFromTestCase(Python_ZSPTests))
suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(Python_SMTests))
if not os.environ.get('PURE_PYTHON'):
if not int(os.environ.get('PURE_PYTHON', '0')):
suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(C_ZSPTests))
suite.addTest(
Expand Down

0 comments on commit f7f1adf

Please sign in to comment.