1. Pypy
  2. Untitled project
  3. pypy


Brian Kearns  committed c113eeb

fix some app_main tests when time isn't built-in to the host python

  • Participants
  • Parent commits 79f1404
  • Branches default

Comments (0)

Files changed (1)

File pypy/interpreter/app_main.py

View file
  • Ignore whitespace
         root = dn(dn(dn(thisfile)))
         return [join(root, 'lib-python', '2.7'),
                 join(root, 'lib_pypy')]
     def pypy_resolvedirof(s):
         # we ignore the issue of symlinks; for tests, the executable is always
         # interpreter/app_main.py anyway
     del os # make sure that os is not available globally, because this is what
            # happens in "real life" outside the tests
+    if 'time' not in sys.builtin_module_names:
+        # make some tests happy by loading this before we clobber sys.path
+        import time; del time
     # no one should change to which lists sys.argv and sys.path are bound
     old_argv = sys.argv
     old_path = sys.path