[Python-checkins] r43743 - python/trunk/Lib/test/test_optparse.py
neal.norwitz
python-checkins at python.org
Sun Apr 9 08:26:13 CEST 2006
Author: neal.norwitz
Date: Sun Apr 9 08:26:12 2006
New Revision: 43743
Modified:
python/trunk/Lib/test/test_optparse.py
Log:
Get test_optparse to pass in -R mode by stop changing state (COLUMNS env var)
Modified: python/trunk/Lib/test/test_optparse.py
==============================================================================
--- python/trunk/Lib/test/test_optparse.py (original)
+++ python/trunk/Lib/test/test_optparse.py Sun Apr 9 08:26:12 2006
@@ -1382,8 +1382,15 @@
class TestHelp(BaseTest):
def setUp(self):
+ self.orig_columns = os.environ.get('COLUMNS')
self.parser = self.make_parser(80)
+ def tearDown(self):
+ if self.orig_columns is None:
+ del os.environ['COLUMNS']
+ else:
+ os.environ['COLUMNS'] = self.orig_columns
+
def make_parser(self, columns):
options = [
make_option("-a", type="string", dest='a',
More information about the Python-checkins
mailing list