def test_read_dimension(datadir, filename, expected): datadir.join("reader").chdir() with open(filename) as handle: dimension = read_dimension(handle) assert dimension == expected