コード例 #1
0
def _find_ssl_darwin():
    s = testlib.subprocess__check_output(['otool', '-l', _ssl.__file__])
    for line in s.decode().splitlines():
        bits = line.split()
        if bits[0] == 'name' and 'libssl' in bits[1]:
            return bits[1]
コード例 #2
0
 def test_self_contained_program(self):
     # Ensure a program composed of a single script can be imported
     # successfully.
     args = [sys.executable, testlib.data_path('self_contained_program.py')]
     output = testlib.subprocess__check_output(args).decode()
     self.assertEquals(output, "['__main__', 50]\n")
コード例 #3
0
def _find_ssl_linux():
    s = testlib.subprocess__check_output(['ldd', _ssl.__file__])
    for line in s.decode().splitlines():
        bits = line.split()
        if bits[0].startswith('libssl'):
            return bits[2]