Commits

Brian Kearns committed a06da79

fix some tests for bsd

Comments (0)

Files changed (3)

pypy/module/__pypy__/__init__.py

 class TimeModule(MixedModule):
     appleveldefs = {}
     interpleveldefs = {}
-    if sys.platform.startswith("linux"):
+    if sys.platform.startswith("linux") or 'bsd' in sys.platform:
         from pypy.module.__pypy__ import interp_time
         interpleveldefs["clock_gettime"] = "interp_time.clock_gettime"
         interpleveldefs["clock_getres"] = "interp_time.clock_getres"

pypy/module/rctime/test/test_rctime.py

         # input to [w]strftime is not kosher.
         if os.name == 'nt':
             raises(ValueError, rctime.strftime, '%f')
-        elif sys.platform == 'darwin':
+        elif sys.platform == 'darwin' or 'bsd' in sys.platform:
             # darwin strips % of unknown format codes
             # http://bugs.python.org/issue9811
             assert rctime.strftime('%f') == 'f'

pypy/module/signal/test/test_signal.py

         if sys.platform == 'win32':
             raises(ValueError, signal, 42, lambda *args: None)
             raises(ValueError, signal, 7, lambda *args: None)
-        elif sys.platform == 'darwin':
+        elif sys.platform == 'darwin' or 'bsd' in sys.platform:
             raises(ValueError, signal, 42, lambda *args: None)
         else:
             signal(42, lambda *args: None)