Skip to content

Commit ae28bcc

Browse files
committed
test if values are preserved
1 parent d37bd6e commit ae28bcc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/chapter02/2.6 - Palindrome/miguel_2.6_soln.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ def test_is_palindrome(self):
249249

250250
def test_is_palindrome_constant_space(self):
251251
for ll, expected in self.test_cases:
252+
ll_temp = LinkedList(*[ll.get_node_at(i) for i in range(ll.size)])
252253
self.assertEqual(is_palindrome_constant_space(ll), expected, msg=ll)
254+
self.assertEqual(ll_temp, ll)
253255

254256

255257
if __name__ == '__main__':

0 commit comments

Comments
 (0)