1
# -*- coding: utf-8 -*-
2
from mago.test_suite.gcalc import GCalctoolTestSuite
4
class GCalctoolOptions(GCalctoolTestSuite):
5
def check_thousands(self, input, oracle, view='BASIC'):
6
if self.application.get_view() != view:
7
self.application.set_view(view)
9
self.application.push(str(input))
10
self.application.set_thousands_separator()
11
value = self.application.get_value()
12
if unicode(value) == unicode(oracle):
15
raise AssertionError, "Expected %s, calculator returned %s" % (oracle, value)
18
self.application.set_thousands_separator(False)
19
GCalctoolTestSuite.cleanup(self)
22
self.application.set_thousands_separator(False)
23
GCalctoolTestSuite.teardown(self)
26
if __name__ == "__main__":
27
gcalctool_calculations_test = GCalctoolOptions()
28
gcalctool_calculations_test.run()