class PcdRangeFrame(aw.Frame): """ Frame Gestione tabella Range sottoconti. """ def __init__(self, *args, **kwargs): if not kwargs.has_key('title') and len(args) < 3: kwargs['title'] = FRAME_TITLE aw.Frame.__init__(self, *args, **kwargs) self.AddSizedPanel(PdcRangePanel(self, -1)) # --------------------------------------------------------------------------- def runTest(frame, nb, log): win = PdcRangeDialog() win.Show() return win # ------------------------------------------------------------------------------ if __name__ == '__main__': import sys,os import runtest import stormdb as adb db = adb.DB() db.Connect() runtest.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
class CatForDialog(ga._AnagDialog): """ Dialog Gestione tabella Categorie fornitori. """ def __init__(self, *args, **kwargs): if not kwargs.has_key('title') and len(args) < 3: kwargs['title'] = FRAME_TITLE ga._AnagDialog.__init__(self, *args, **kwargs) self.LoadAnagPanel(CatForPanel(self, -1)) # --------------------------------------------------------------------------- def runTest(frame, nb, log): win = CatForDialog() win.Show() return win # ------------------------------------------------------------------------------ if __name__ == '__main__': import sys,os import runtest import stormdb as adb db = adb.DB() db.Connect() runtest.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
with runtest.RedirectStdStreams(main_stdout): emulatorlauncher.main(argparse.Namespace(**self.args)) output_str = main_stdout.getvalue() main_stdout.close() config_user = LinappleConfig(self.path_user_conf) # Check results self.assertDictContentEqual(config_init.settings, config_user.settings) def test_config_upgrade(self): generator = LinappleGenerator(self.path_init, self.path_user) generator.config_upgrade('v4.0.0 2016/03/20 01:19') def test_config_upgrade_all(self): result = True generators = emulatorlauncher.generators for _,g in generators.items(): result &= g.config_upgrade('v4.0.0 2016/03/20 01:19') #self.assertTrue(result) if __name__ == "__main__": runtest.main(testLoader=runtest.TestLoader()) # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
pass if exists("/tmp/testsimulator"): os.remove("/tmp/testsimulator") # Windows doesn't have symbolic links, so copy the file. copy("simulator", "/tmp/testsimulator") for dir in testDirs: for testFile in glob(join(dir, "*.test")): print "Running " + testFile base = basename(testFile[:-5]) out = join(dir, base + ".out") # Why do we not pass "--generate" to runtest??? outf = open(out + ".new", "w") #runtest.main((testFile,), myStdout=outf, generate=generate) runtest.main((testFile,), myStdout=outf) outf.close() if generate and not exists(out): copy(out + ".new", out) print "Generated new " + out if filecmp.cmp(out, out + ".new"): os.remove(out + ".new") else: print >> sys.__stderr__, "Test failed: " + testFile os.system("diff %s %s.new > %s.diff" % (out, out, out)) exitStatus = 1 os.remove("/tmp/testsimulator")
pass if exists("/tmp/testsimulator"): os.remove("/tmp/testsimulator") # Windows doesn't have symbolic links, so copy the file. copy("simulator", "/tmp/testsimulator") for dir in testDirs: for testFile in glob(join(dir, "*.test")): print "Running " + testFile base = basename(testFile[:-5]) out = join(dir, base + ".out") # Why do we not pass "--generate" to runtest??? outf = open(out + ".new", "w") #runtest.main((testFile,), myStdout=outf, generate=generate) runtest.main((testFile, ), myStdout=outf) outf.close() if generate and not exists(out): copy(out + ".new", out) print "Generated new " + out if filecmp.cmp(out, out + ".new"): os.remove(out + ".new") else: print >> sys.__stderr__, "Test failed: " + testFile os.system("diff %s %s.new > %s.diff" % (out, out, out)) exitStatus = 1 os.remove("/tmp/testsimulator")