예제 #1
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)
예제 #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 testGetFileModTime(self):
     """Test getting a files modtime"""
     mtime = ebmlib.GetFileModTime(self.fpath)
     self.assertNotEqual(mtime, 0, "Mtime was: " + str(mtime))
예제 #4
0
 def setUp(self):
     self.path = common.GetDataFilePath(u'test_read_utf8.txt')
     self.file = ebmlib.FileObjectImpl(self.path)
     self.mtime = ebmlib.GetFileModTime(self.path)
예제 #5
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)
예제 #6
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 = ebmlib.GetFileModTime(self.path)