-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathruntests.py
More file actions
33 lines (25 loc) · 857 Bytes
/
runtests.py
File metadata and controls
33 lines (25 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
#encoding: utf-8
from __future__ import print_function
import os
import sys
from subprocess import STDOUT, Popen
#Add dist to PYTHONPATH
sys.path.append("/".join([os.path.abspath("."), "dist"]))
#We run our converter to cipher the module
CryptConv = "dist/CryptConv"
p = Popen(" ".join([CryptConv, "test_script.py", "EncModule.pye"]), shell=True)
p.wait()
p = Popen(" ".join([CryptConv, "test_script_b.py", "EncModuleB.pye"]), shell=True)
p.wait()
#Now, for the Actual Test
print("Starting Test. Importing CryptImpHook", end="\n")
from CryptImpHook import CryptImpHook
print("Adding CryptImpHook to meta_path", end="\n")
sys.meta_path.append(CryptImpHook())
print("Import class C from EncModule", end="\n")
#Now lets import our Module
import EncModule
EncModule.C(1, 2, 3)
import EncModuleB
EncModuleB.some_function_b(4, 5, 6)