diff options
author | Robert Collins <robertc@robertcollins.net> | 2015-05-04 12:12:16 +1200 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2015-05-04 12:12:16 +1200 |
commit | bccfaa71a2def5590161b6d1a247cf23c45a8b4d (patch) | |
tree | 4205080a391dc00332f018d781026b2381ddb2c6 /README | |
parent | 475857af19a8190c9c0c7f8241b9907b942e19fd (diff) | |
download | testscenarios-bccfaa71a2def5590161b6d1a247cf23c45a8b4d.tar.gz |
0.4
~~~
IMPROVEMENTS
------------
* Python 3.2 support added. (Robert Collins)
Diffstat (limited to 'README')
-rw-r--r-- | README | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -98,7 +98,10 @@ you can cause scenario application to happen later by calling ``testscenarios.generate_scenarios()``. For instance:: >>> import unittest - >>> import StringIO + >>> try: + ... from StringIO import StringIO + ... except ImportError: + ... from io import StringIO >>> from testscenarios.scenarios import generate_scenarios This can work with loaders and runners from the standard library, or possibly other @@ -106,7 +109,7 @@ implementations:: >>> loader = unittest.TestLoader() >>> test_suite = unittest.TestSuite() - >>> runner = unittest.TextTestRunner(stream=StringIO.StringIO()) + >>> runner = unittest.TextTestRunner(stream=StringIO()) >>> mytests = loader.loadTestsFromNames(['doc.test_sample']) >>> test_suite.addTests(generate_scenarios(mytests)) @@ -211,7 +214,7 @@ cross product of tests. :: ... >>> suite2 = unittest.TestSuite() >>> suite2.addTests(generate_scenarios(suite)) - >>> print suite2.countTestCases() + >>> print(suite2.countTestCases()) 4 Dynamic Scenarios |