Exemplo n.º 1
0
class ScanTester:
    def __init__(self, test):
        self._test = test
        self._scanner = EnvScanner()

    def run(self, tc):
        for t in self._test:
            r = self._scanner.parse(t[0], self.callback)
            #print("    ('{0}', '{1}'),".format(t[0], r))
            tc.assertEqual(t[1], r)

    def callback(self, buf, whole):
        return "<" + buf + ">"
Exemplo n.º 2
0
class ScanTester:
    
    def __init__(self, test):
        self._test = test
        self._scanner = EnvScanner()

    def run(self, tc):
        for t in self._test:
            r = self._scanner.parse(t[0], self.callback)
            #print("    ('{0}', '{1}'),".format(t[0], r))
            tc.assertEqual(t[1], r)

    def callback(self, buf, whole):
        return "<"+buf+">"
Exemplo n.º 3
0
 def __init__(self, test):
     self._test = test
     self._scanner = EnvScanner()
Exemplo n.º 4
0
 def __init__(self, test):
     self._test = test
     self._scanner = EnvScanner()