spacesInTag = "<a href = 'spaced.html'>" self.assertEquals( set(['http://www.example.com/my-url/spaced.html']), site_diff.extract_urls(base_url, spacesInTag)) # JavaScript variable assignment isn't handled correctly. jsText = "var src = true;" self.assertEquals( set([ 'http://www.example.com/my-url/true' ]), site_diff.extract_urls(base_url, jsText)) def main(argv): gflags.MarkFlagAsRequired('phantomjs_binary') gflags.MarkFlagAsRequired('phantomjs_script') try: argv = FLAGS(argv) except gflags.FlagsError, e: print '%s\nUsage: %s ARGS\n%s' % (e, sys.argv[0], FLAGS) sys.exit(1) test_utils.debug_log_everything() unittest.main(argv=argv) if __name__ == '__main__': main(sys.argv)
spacesInTag = "<a href = 'spaced.html'>" self.assertEquals( set(['http://www.example.com/my-url/spaced.html']), site_diff.extract_urls(base_url, spacesInTag)) # JavaScript variable assignment isn't handled correctly. jsText = "var src = true;" self.assertEquals( set([ 'http://www.example.com/my-url/true' ]), site_diff.extract_urls(base_url, jsText)) def main(argv): gflags.MarkFlagAsRequired('capture_binary') gflags.MarkFlagAsRequired('capture_script') try: argv = FLAGS(argv) except gflags.FlagsError, e: print '%s\nUsage: %s ARGS\n%s' % (e, sys.argv[0], FLAGS) sys.exit(1) test_utils.debug_log_everything() unittest.main(argv=argv) if __name__ == '__main__': main(sys.argv)
def main(argv): test_utils.debug_log_everything() argv = FLAGS(argv) unittest.main(argv=argv)