File: test_testcapi.py

package info (click to toggle)
pypy3 7.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,848 kB
  • sloc: python: 1,291,746; ansic: 74,281; asm: 5,187; cpp: 3,017; sh: 2,533; makefile: 544; xml: 243; lisp: 45; csh: 21; awk: 4
file content (15 lines) | stat: -rw-r--r-- 506 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import py, sys

if '__pypy__' not in sys.builtin_module_names:
    py.test.skip('pypy only test')

from lib_pypy import _testcapi #make sure _testcapi is built

def test_get_hashed_dir():
    import sys
    # This should not compile _testcapi, so the output is empty
    script = "import _testcapi; assert 'get_hashed_dir' not in dir(_testcapi)"
    output = py.process.cmdexec('''"%s" -c "%s"''' %
                             (sys.executable, script))
    assert output == ''