Skip to content

Commit

Permalink
Fix tests on 32-bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Oct 31, 2017
1 parent a8cb8a2 commit 3fc070d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/zope/server/tests/test_trigger.py
Expand Up @@ -4,22 +4,23 @@
"""
from __future__ import print_function
import sys
import unittest

from zope.server import trigger


class TestFunctions(unittest.TestCase):

def test_positive_id(self):

expected = 18446744073709551574 if sys.maxsize > 2**32 else 4294967254
trigger.id = lambda o: -42
try:
# This is possibly only correct on 64-bit platforms
self.assertEqual(18446744073709551574,
trigger.positive_id(None))
self.assertEqual(trigger.positive_id(None), expected)
finally:
del trigger.id


@unittest.skipIf(not hasattr(trigger, 'pipetrigger'),
"pipetrigger not available on Windows")
class TestPipeTrigger(unittest.TestCase):
Expand Down

0 comments on commit 3fc070d

Please sign in to comment.