def test_mnist_download(tmpdir):
    """ Demonstrates that MNIST download works, using only the 'test' data. Assumes data does not change often. """
    o = download_mnist_data(tmpdir, train=False)
    assert 10000 == len(o)
    assert o[0][1] == 7
    assert o[len(o) - 1][1] == 6
 Demonstrates that MNIST download works, using only the 'test' data. Assumes data does not change often. 
examples/mnist/tests/test_pytorch_mnist.py