1
# -*- coding: utf-8 -*-
3
from time import time, gmtime, strftime
5
from mago.test_suite.gedit import GEditTestSuite
6
from mago.check import FileComparison, FAIL
8
class GEditChain(GEditTestSuite):
9
def testChain(self, oracle=None, chain=None):
11
"/tmp/" + "%Y%m%d_%H%M%S" + ".txt", gmtime((time())))
13
self.application.write_text(chain)
14
self.application.save(test_file)
16
# oracle file path is assumed to be relative
18
oracle = os.path.join(self.get_test_dir(), oracle)
20
testcheck = FileComparison(oracle, test_file)
22
if testcheck.perform_test() == FAIL:
23
raise AssertionError, "Files differ"
25
if __name__ == "__main__":
26
gedit_chains_test = GEditChain()
27
gedit_chains_test.run()