summaryrefslogtreecommitdiff
path: root/tests/test_phystokens.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-12-21 07:59:14 -0500
committerNed Batchelder <ned@nedbatchelder.com>2013-12-21 07:59:14 -0500
commit521be8203abbcb8308311dd1584b311e5b476f1a (patch)
tree0eb222cc03b6dc2050dabb33ce2aab248b4919b3 /tests/test_phystokens.py
parent8ab5ac1c524ed0423bbfb655d2e3c7d4cc4902f3 (diff)
downloadpython-coveragepy-git-521be8203abbcb8308311dd1584b311e5b476f1a.tar.gz
Use assertRaises as a context manager now that we can.
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r--tests/test_phystokens.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
index 9ff053c4..e15400b6 100644
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -118,4 +118,5 @@ if sys.version_info < (3, 0):
# But it has to be the only authority.
source = "\xEF\xBB\xBF# coding: cp850\n"
- self.assertRaises(SyntaxError, source_encoding, source)
+ with self.assertRaises(SyntaxError):
+ source_encoding(source)