Skip to content

Commit

Permalink
Added exception and unittest for dist_mat_to_vec of analysis/psa.py (…
Browse files Browse the repository at this point in the history
…Part of MDAnalysis#597)
  • Loading branch information
vedantrathore committed Jan 23, 2017
1 parent bf8765b commit cda6c57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion testsuite/MDAnalysisTests/analysis/test_psa.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ def test_dist_mat_to_vec_func_out_of_bounds(self):

# Check if both i and j are out of bounds of N
with self.assertRaises(ValueError):
PSA.dist_mat_to_vec(5, 6, 6)
PSA.dist_mat_to_vec(5, 6, 7)

def test_dist_mat_to_vec_func_i_equals_j(self):
"""Test that ValueError is raised when i == j"""

with self.assertRaises(ValueError):
PSA.dist_mat_to_vec(5, 4, 4)

def test_dist_mat_to_vec_func_bad_integers(self):
"""Test that ValueError is raised when i or j are
Expand Down

0 comments on commit cda6c57

Please sign in to comment.