Ejemplo n.º 1
0
def test_proxy():
    while True:
        try:
            main()
        except AttributeError:
            time.sleep(TEST_PROXY_POOL_CYCLE)
            continue
        time.sleep(TEST_PROXY_POOL_CYCLE)
Ejemplo n.º 2
0
 def run_with_config(self, config):
     self.dir.write('checker.txt', config)
     main(('-C ' + self.dir.path).split())
Ejemplo n.º 3
0
 def run_with_config(self, config, args=''):
     config += '\nreal:checker'
     self.dir.write('checker.txt', config)
     main(('-C ' + self.dir.path + args).split())
Ejemplo n.º 4
0
 def test_no_args(self):
     with OpenRaisesContext(["ascript"]):
         # make sure we look for the config in /config by default
         with ShouldRaise(IOError("'/config/checker.txt' 'rU'")):
             main()
Ejemplo n.º 5
0
 def test_abspath_config_folder(self):
     with OpenRaisesContext("ascript -C config".split()):
         # make any config specified is abspath'ed
         path = cleanup(os.path.abspath("config/checker.txt"))
         with ShouldRaise(IOError("%r 'rU'" % path)):
             main()
Ejemplo n.º 6
0
 def test_abspath_config_folder(self):
     with OpenRaisesContext('ascript -C config'.split()):
         # make any config specified is abspath'ed
         path = cleanup(os.path.abspath('config/checker.txt'))
         with ShouldRaise(IOError("%r 'rU'" % path)):
             main()
Ejemplo n.º 7
0
 def test_no_args(self):
     with OpenRaisesContext(['ascript']):
         # make sure we look for the config in /config by default
         with ShouldRaise(IOError("'/config/checker.txt' 'rU'")):
             main()
Ejemplo n.º 8
0
 def run_with_config(self, config, args=''):
     config += '\nreal:checker'
     self.dir.write('checker.txt', config)
     main(('-C '+self.dir.path+args).split())
Ejemplo n.º 9
0
 def run_with_config(self,config):
     self.dir.write('checker.txt',config)
     main(('-C '+self.dir.path).split())
from checker import check

if __name__ == "__main__":
    check.main()