[Python-checkins] r54859 - sandbox/trunk/pep0/test_pep0.py
brett.cannon
python-checkins at python.org
Wed Apr 18 05:01:48 CEST 2007
Author: brett.cannon
Date: Wed Apr 18 05:01:41 2007
New Revision: 54859
Modified:
sandbox/trunk/pep0/test_pep0.py
Log:
A wee bit of refactoring.
Modified: sandbox/trunk/pep0/test_pep0.py
==============================================================================
--- sandbox/trunk/pep0/test_pep0.py (original)
+++ sandbox/trunk/pep0/test_pep0.py Wed Apr 18 05:01:41 2007
@@ -1,6 +1,7 @@
from __future__ import with_statement
import pep0.parse
+import itertools
import unittest
from test import test_support
from contextlib import contextmanager
@@ -10,9 +11,12 @@
"""Test pep0.parse ."""
+ def create_path(self):
+ return test_support.TESTFN + str(self.num)
+
def setUp(self):
self.num = 42
- self.path = test_support.TESTFN + str(self.num)
+ self.path = self.create_path()
def tearDown(self):
if os.path.exists(self.path):
@@ -67,7 +71,6 @@
self.failUnlessRaises(ValueError, pep0.parse.consume_pep, self.path)
-
class HandlerTests(unittest.TestCase):
"""Test the PEP field handlers for parsing data."""
More information about the Python-checkins
mailing list