Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions exercises/matrix/matrix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ def test_can_extract_row_from_non_square_matrix(self):
matrix = Matrix("1 2 3\n4 5 6\n7 8 9\n8 7 6")
self.assertEqual(matrix.row(3), [7, 8, 9])

def test_extract_row_from_a_column_matrix(self):
matrix = Matrix("1\n2\n3")
self.assertEqual(matrix.row(1), [1])

def test_extract_column_from_one_number_matrix(self):
matrix = Matrix("1")
self.assertEqual(matrix.column(1), [1])

def test_extract_column_from_a_column_matrix(self):
matrix = Matrix("1\n2\n3")
self.assertEqual(matrix.column(1), [1, 2, 3])

def test_can_extract_column(self):
matrix = Matrix("1 2 3\n4 5 6\n7 8 9")
self.assertEqual(matrix.column(3), [3, 6, 9])
Expand Down