def main(): ''' Runs the test by spawning off another IP process which utilizes the newly created DLLs directory. ''' try: setUp() Directory.SetCurrentDirectory(ORIG_DIR) from iptest.process_util import launch_ironpython_changing_extensions ret_val = launch_ironpython_changing_extensions("dllsite.py", add=["-S"], additionalScriptParams=("OKtoRun",)) finally: cleanUp() exit(ret_val)
def main(): ''' Runs the test by spawning off another IP process which utilizes the newly created DLLs directory. ''' try: setUp() Directory.SetCurrentDirectory(ORIG_DIR) from iptest.process_util import launch_ironpython_changing_extensions ret_val = launch_ironpython_changing_extensions("dllsite.py", add=["-S"], additionalScriptParams=("OKtoRun",)) finally: cleanUp() exit(ret_val)
nt.unlink(cp24381_file_name) AreEqual(CP24381_MESSAGES, [ 'call', None, 'line', None, 'line', None, 'line', None, 'line', None, 'line', None, 'call', None, 'line', None, 'return', None, 'return', None ]) #--MAIN------------------------------------------------------------------------ testDelGetFrame = "Test_GetFrame" in sys.argv if testDelGetFrame: print 'Calling test_getframe()...' test_getframe() print 'Calling test_cp24242()...' test_cp24242() else: run_test(__name__) # this is a destructive test, run it in separate instance of IronPython if not is_silverlight and sys.platform != "win32": from iptest.process_util import launch_ironpython_changing_extensions AreEqual( 0, launch_ironpython_changing_extensions(__file__, ["-X:FullFrames"], [], ("Test_GetFrame", ))) elif sys.platform == "win32": print 'running test_getframe on cpython' import subprocess subprocess.check_call([sys.executable, __file__, "Test_GetFrame"])
sys.settrace(f) import cp24381 finally: sys.settrace(orig_sys_trace_func) nt.unlink(cp24381_file_name) AreEqual(CP24381_MESSAGES, ['call', None, 'line', None, 'line', None, 'line', None, 'line', None, 'line', None, 'call', None, 'line', None, 'return', None, 'return', None]) #--MAIN------------------------------------------------------------------------ testDelGetFrame = "Test_GetFrame" in sys.argv if testDelGetFrame: print 'Calling test_getframe()...' test_getframe() print 'Calling test_cp24242()...' test_cp24242() else: run_test(__name__) # this is a destructive test, run it in separate instance of IronPython if not is_silverlight and sys.platform!="win32": from iptest.process_util import launch_ironpython_changing_extensions AreEqual(0, launch_ironpython_changing_extensions(__file__, ["-X:FullFrames"], [], ("Test_GetFrame",))) elif sys.platform == "win32": print 'running test_getframe on cpython' import subprocess subprocess.check_call([sys.executable, __file__, "Test_GetFrame"])
global called cp = super(TransLabel, self).CreateParams cp.ExStyle = cp.ExStyle | val called = True return cp CreateParams = property(fget=get_CreateParams) a = TransLabel() AreEqual(called, True) def test_misc_coverage(): import clr clr.AddReference("IronPython") from IronPython.Runtime.Types import SlotFieldAttribute as SFA temp = SFA() AreEqual(temp.GetType().Name, "SlotFieldAttribute") # use this when running standalone #run_test(__name__) run_test(__name__, noOutputPlease=True) if not privateBinding: from iptest.process_util import launch_ironpython_changing_extensions AreEqual( launch_ironpython_changing_extensions(__file__, add=["-X:PrivateBinding"]), 0)
global called called = False class TransLabel(Label): def get_CreateParams(self): global called cp = super(TransLabel, self).CreateParams cp.ExStyle = cp.ExStyle | val called = True return cp CreateParams = property(fget=get_CreateParams) a = TransLabel() AreEqual(called, True) def test_misc_coverage(): import clr clr.AddReference("IronPython") from IronPython.Runtime.Types import SlotFieldAttribute as SFA temp = SFA() AreEqual(temp.GetType().Name, "SlotFieldAttribute") # use this when running standalone #run_test(__name__) run_test(__name__, noOutputPlease=True) if not privateBinding and not is_silverlight: from iptest.process_util import launch_ironpython_changing_extensions AreEqual(launch_ironpython_changing_extensions(__file__, add=["-X:PrivateBinding"]), 0)