Пример #1
0
 def setUp(self):
     self.app = common.EdApp(False)
     self.mgr = ed_style.StyleMgr()
     self.dd = ed_style.DEF_STYLE_DICT
     self.bstr = [
         "fore:#000000", "back:#FFFFFF", "face:%(primary)s", "size:%(size)d"
     ]
Пример #2
0
    def setUp(self):
        profiler.Profile_Set('ENCODING', locale.getpreferredencoding())

        self.app = common.EdApp(False)
        self.path = common.GetDataFilePath(u'test_read_utf8.txt')
        self.file = ed_txt.EdFile(self.path)
        self.mtime = ebmlib.GetFileModTime(self.path)

        self.rpath = common.GetDataFilePath(u'embedded_nulls.txt')
        self.rfile = ed_txt.EdFile(self.rpath)

        self.ipath = common.GetDataFilePath(u'image_test.png')
        self.img = ed_txt.EdFile(self.ipath)

        self.bpath = common.GetDataFilePath(u'test_read_utf8_bom.txt')
        self.utf8_bom_file = ed_txt.EdFile(self.bpath)
Пример #3
0
    def setUp(self):
        # NEED this otherwise GetApp calls fail for some yet to be
        # determined reason even though an App has been created earlier
        # in runUnitTests...
        self.app = common.EdApp(False)

        self.path = common.GetDataFilePath(u'test_read_utf8.txt')
        self.file = ed_txt.EdFile(self.path)
        self.mtime = ebmlib.GetFileModTime(self.path)

        self.path_utf16 = common.GetDataFilePath(u'test_read_utf16.txt')
        self.mtime_utf16 = ebmlib.GetFileModTime(self.path_utf16)

        self.path_utf16_big = common.GetDataFilePath(u'test_read_utf16_big.txt')

        self.ipath = common.GetDataFilePath(u'image_test.png')
        self.img = ed_txt.EdFile(self.ipath)

        self.bpath = common.GetDataFilePath(u'test_read_utf8_bom.txt')
        self.utf8_bom_file = ed_txt.EdFile(self.bpath)
Пример #4
0
 def setUp(self):
     self.app = common.EdApp(False)
     self.path = os.path.abspath('./data/test_read_utf8.txt')
     self.file = ed_txt.EdFile(self.path)
     self.mtime = util.GetFileModTime(self.path)
Пример #5
0
 def setUp(self):
     ed_glob.CONFIG['THEME_DIR'] = common.GetThemeDir()
     self.app = common.EdApp(False)
     pmgr = self.app.GetPluginManager()
     self.bmpprov = ed_theme.BitmapProvider(pmgr)
Пример #6
0
            if failure in results["failure_data"]:
                type = "Fail: "
            elif failure in results["error_data"]:
                type = "Error: "
            output("   " + type + str(failure[0]))
            output("      " + str(failure[1]).replace("\n", "\n      "))


#-----------------------------------------------------------------------------#
if __name__ == '__main__':
    (options, args) = parser.parse_args()

    # Options error-checking
    if options.module_list != "" and options.module_ex_list != "":
        parser.error(
            "options --exclude-modules and --include-modules are mutually exclusive"
        )

    # File redirect
    if options.outfilename != "":
        origstdout = sys.stdout
        try:
            sys.stdout = open(options.outfilename, 'w')
        except IOError:
            print "Error opening output file, defaulting to original stdout"
            sys.stdout = origstdout

    app = common.EdApp(False)
    runUnitTestsAndOutputResults()
#    app.MainLoop()
Пример #7
0
 def setUp(self):
     self.app = common.EdApp(False)
     self.path = common.GetDataFilePath(u'test_read_utf8.txt')
     self.file = ed_txt.EdFile(self.path)
     self.mtime = ebmlib.GetFileModTime(self.path)
Пример #8
0
 def setUp(self):
     self.app = common.EdApp(False)
     ap = ed_art.EditraArt()
     wx.ArtProvider.Push(ap)