Skip to content

Instantly share code, notes, and snippets.

@sublee
Created October 26, 2012 09:09
Show Gist options
  • Save sublee/3957770 to your computer and use it in GitHub Desktop.
Save sublee/3957770 to your computer and use it in GitHub Desktop.
@suite.test
def deprecated():
r1, r2, r3 = Rating(), Rating(), Rating()
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always', DeprecationWarning)
transform_ratings([(r1,), (r2,), (r3,)])
match_quality([(r1,), (r2,), (r3,)])
assert len(w) == 2
assert w[0].category is DeprecationWarning
assert w[-1].category is DeprecationWarning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment