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