Пример #1
0
def test_not_in_place__ko_3():
	"""
		test not_in_place some unvalid anwer, with many change
	"""
	exemple = []
	for i in range(1, 3*3+1):
		exemple.append(i)
	assert functions.not_in_place(
		3,
		[4, 6, 2, 9, 8, 3, 1, 5, 7],
		[1, 2, 3, 4, 5, 6, 7, 8, 9]
	) == 8
Пример #2
0
def test_not_in_place__ko_2():
	"""
		test not_in_place some unvalid anwer, with a far change
	"""
	exemple = []
	for i in range(1, 3*3+1):
		exemple.append(i)
	assert functions.not_in_place(
		3,
		[9, 2, 3, 4, 5, 6, 7, 8, 1],
		[1, 2, 3, 4, 5, 6, 7, 8, 9]
	) == 1
Пример #3
0
def test_not_in_place__ok_2():
	"""
		test not_in_place some valid anwer, with medium puzzle
	"""
	exemple = []
	for i in range(1, 5*5+1):
		exemple.append(i)
	assert functions.not_in_place(
		5,
		exemple,
		exemple
	) == 0
Пример #4
0
def test_not_in_place__ok_3():
	"""
		test not_in_place some valid anwer, with big puzzle
	"""
	exemple = []
	for i in range(1, 12*12+1):
		exemple.append(i)
	assert functions.not_in_place(
		12,
		exemple,
		exemple
	) == 0
Пример #5
0
def test_not_in_place__ok_1():
	"""
		test not_in_place some valid anwer, with swall puzzle
	"""
	exemple = []
	for i in range(1, 2*2+1):
		exemple.append(i)
	assert functions.not_in_place(
		2,
		exemple,
		exemple
	) == 0