def test_mnist(): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers() mnist.fill_subparser(subparsers.add_parser('mnist')) args = parser.parse_args(['mnist']) filenames = ['train-images-idx3-ubyte.gz', 'train-labels-idx1-ubyte.gz', 't10k-images-idx3-ubyte.gz', 't10k-labels-idx1-ubyte.gz'] urls = ['http://yann.lecun.com/exdb/mnist/' + f for f in filenames] assert_equal(args.filenames, filenames) assert_equal(args.urls, urls) assert args.func is default_downloader