Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect PURE_PYTHON environment variable set to 0 #158

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ For changes before version 3.0, see ``HISTORY.rst``.
7.1 (unreleased)
----------------

- Respect ``PURE_PYTHON`` environment variable set to ``0`` when running tests.


7.0 (2024-05-30)
----------------
Expand Down
4 changes: 3 additions & 1 deletion 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,7 +253,7 @@ def _getTargetClass(self):
return SecurityManager


@unittest.skipIf(os.environ.get('PURE_PYTHON'), 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 os.environ.get('PURE_PYTHON'):
if not PURE_PYTHON:
suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(C_ZSPTests))
suite.addTest(
Expand Down
Loading