mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
add import statement for clarity
This commit is contained in:
+2
-1
@@ -248,7 +248,8 @@ OK</samp></pre>
|
||||
</blockquote>
|
||||
<p>What would that test look like?
|
||||
<p class=d>[<a href=examples/romantest2.py>download <code>romantest2.py</code></a>]
|
||||
<pre class=pp><code><a>class ToRomanBadInput(unittest.TestCase): <span class=u>①</span></a>
|
||||
<pre class=pp><code>import unittest, roman2
|
||||
<a>class ToRomanBadInput(unittest.TestCase): <span class=u>①</span></a>
|
||||
<a> def test_too_large(self): <span class=u>②</span></a>
|
||||
'''to_roman should fail with large input'''
|
||||
<a> self.assertRaises(roman2.OutOfRangeError, roman2.to_roman, 4000) <span class=u>③</span></a></code></pre>
|
||||
|
||||
Reference in New Issue
Block a user