Exemple #1
0
def test_proxy():
    while True:
        try:
            main()
        except AttributeError:
            time.sleep(TEST_PROXY_POOL_CYCLE)
            continue
        time.sleep(TEST_PROXY_POOL_CYCLE)
Exemple #2
0
 def run_with_config(self, config):
     self.dir.write('checker.txt', config)
     main(('-C ' + self.dir.path).split())
Exemple #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())
Exemple #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()
Exemple #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()
Exemple #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()
Exemple #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()
Exemple #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())
Exemple #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()