Skip to content

Commit

Permalink
add check for warnings count
Browse files Browse the repository at this point in the history
  • Loading branch information
jburos committed Jul 8, 2016
1 parent 3878c9e commit 0220965
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def test_summarize_provenance():

## should see a warning when loading provenance
## & provenance value should be None
print(cohort.summarize_provenance_per_cache())
ok_(not cohort.summarize_provenance_per_cache()[cache_name])



# But, when check_provenance is off, we shouldn't get a warning.
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
ok_(not cohort.summarize_provenance_per_cache()[cache_name])
ok_(len(w)>0)

finally:
if cohort is not None:
Expand Down

0 comments on commit 0220965

Please sign in to comment.