<s> import os <EOL> import sys <EOL> import logging <EOL> import unittest <EOL> cpath = os . path . dirname ( os . path . realpath ( __file__ ) ) <EOL> root_path = os . path . abspath ( os . path . join ( cpath , "<STR_LIT:..>" ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , root_path ) <EOL> os . environ [ "<STR_LIT>" ] = "<STR_LIT>" . format ( root_path , os . environ [ "<STR_LIT>" ] ) <EOL> DATA_PATH = os . path . join ( root_path , '<STR_LIT:data>' ) <EOL> import mnist <EOL> class LoaderTestCase ( unittest . TestCase ) : <EOL> def test_dataset_lengths ( self ) : <EOL> mn = mnist . MNIST ( DATA_PATH ) <EOL> test_img , test_label = mn . load_testing ( ) <EOL> train_img , train_label = mn . load_training ( ) <EOL> self . assertEqual ( len ( test_img ) , len ( test_label ) ) <EOL> self . assertEqual ( len ( test_img ) , <NUM_LIT> ) <EOL> self . assertEqual ( len ( train_img ) , len ( train_label ) ) <EOL> self . assertEqual ( len ( train_img ) , <NUM_LIT> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> logging . basicConfig ( level = logging . INFO ) <EOL> unittest . main ( ) </s>
