Skip to content

Commit

Permalink
Fixing sporadically failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
krischer committed Sep 5, 2016
1 parent 31067d9 commit bfea2ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions instaseis/tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ def test_event_parsing_failure_states():
# Event with no moment tensor.
ev = event.copy()
ev.focal_mechanisms[0].moment_tensor = None
# Force this to None to prevent the resource id mechanism to "resurrect"
# the focal mechanism.
ev.preferred_focal_mechanism_id = None
with pytest.raises(SourceParseError) as err:
Source.parse(ev)
assert err.value.args[0] == "Event must contain a moment tensor."
Expand Down

0 comments on commit bfea2ae

Please sign in to comment.