Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use with statement for assert_raises

  • Loading branch information...
commit 3f032d9b7d82f7c61b533889a2277edac14269d7 1 parent 4c9a407
@mdboom authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/matplotlib/tests/test_path.py
View
7 lib/matplotlib/tests/test_path.py
@@ -2,8 +2,7 @@
from nose.tools import assert_raises
def test_readonly_path():
- def readonly():
- path = Path.unit_circle()
- path.vertices = path.vertices * 2.0
+ path = Path.unit_circle()
- assert_raises(AttributeError, readonly)
+ with assert_raises(AttributeError):
+ path.vertices = path.vertices * 2.0
Please sign in to comment.
Something went wrong with that request. Please try again.