Skip to content

Instantly share code, notes, and snippets.

@sanjitk7
Created June 16, 2020 07:24
Show Gist options
  • Save sanjitk7/885468553cbab6facccf6bdcf1a98b8f to your computer and use it in GitHub Desktop.
Save sanjitk7/885468553cbab6facccf6bdcf1a98b8f to your computer and use it in GitHub Desktop.
write test before the add function is written
import unittest
from matrixOperations import add
class TestMatrix(unittest.TestCase):
def test_add(self):
A = [[1,1,1],[1,1,1],[1,1,1]]
B = [[1,1,1],[1,1,1],[1,1,1]]
sum = [[2,2,2],[2,2,2],[2,2,2]]
self.assertEqual(add(A,B),sum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment