Add error & test checks for matrix_operations.py (#925) · zinating/algorithms-python@4e0717c · GitHub
Skip to content

Commit 4e0717c

Browse files
StephenGemincclauss
authored andcommitted
Add error & test checks for matrix_operations.py (TheAlgorithms#925)
* Update matrix_operation.py 1. Adding error checks for integer inputs 2. Adding error checks for matrix operations where size requirements do not match up 3. Added matrix subtraction function 4. included error check so only integer is passed into identity function * Create test_matrix_operation.py * Update matrix_ops and Add Test Cases 1. Included error checks in matrix operation. There were some cases where the functions would not work correctly. 2. PEP8 changes to matrix_operations.py 3. added test cases for matrix operations using pytest. * Update pytest.ini Add carriage return to end of file
1 parent dc1de94 commit 4e0717c

3 files changed

Lines changed: 217 additions & 34 deletions

File tree

matrix/matrix_operation.py

Lines changed: 102 additions & 34 deletions

matrix/tests/pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
markers =
3+
mat_ops: tests for matrix operations
Lines changed: 112 additions & 0 deletions

0 commit comments

Comments
 (0)