Skip to content

Commit

Permalink
Make returning the observation optional for validate_observation
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Jan 25, 2018
1 parent 107e63e commit 3591f59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sciunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ def __init__(self, observation, name=None, **params):
self.verbose = params.pop('verbose',1)
self.params.update(params)

self.observation = self.validate_observation(observation)
validated = self.validate_observation(observation)
self.observation = validated if validated is not None else observation

if self.score_type is None or not issubclass(self.score_type, Score):
raise Error("Test %s does not specify a score type." % self.name)
Expand Down

0 comments on commit 3591f59

Please sign in to comment.