summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2008-04-08 18:15:55 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-04-08 18:15:55 +0000
commitefa7a0085d93f6ee10bad7981f7e1953243b4479 (patch)
tree7d840961b9f2d89a7b16c533f6565d413c8d556f /tests
parent09dbce7d1a3a5591d85d061da40c462ee1d2f534 (diff)
downloadpygobject-efa7a0085d93f6ee10bad7981f7e1953243b4479.tar.gz
pygobject-efa7a0085d93f6ee10bad7981f7e1953243b4479.tar.xz
pygobject-efa7a0085d93f6ee10bad7981f7e1953243b4479.zip
Fix a typo Update the tests after the latest "refactoring". The testsuite
2008-04-08 Johan Dahlin <jdahlin@async.com.br> * gobject/option.py: Fix a typo * tests/test_option.py: Update the tests after the latest "refactoring". The testsuite should run fine now again, finally. svn path=/trunk/; revision=770
Diffstat (limited to 'tests')
-rw-r--r--tests/test_option.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_option.py b/tests/test_option.py
index 69e1766..988ce52 100644
--- a/tests/test_option.py
+++ b/tests/test_option.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
+import optparse
import unittest
import sys
from StringIO import StringIO
@@ -17,6 +18,10 @@ class TestOption(unittest.TestCase):
description="Option unit test")
self.parser.add_option("-t", "--test", help="Unit test option",
action="store_false", dest="test", default=True)
+ self.parser.add_option("--g-fatal-warnings",
+ action="store_true",
+ dest="fatal_warnings",
+ help="dummy"),
def _create_group(self):
def option_callback(option, opt, value, parser):
@@ -83,6 +88,7 @@ class TestOption(unittest.TestCase):
self.failIf(args)
def testOptionValueError(self):
+ self._create_group()
self.assertRaises(option.OptionValueError, self.parser.parse_args,
["test_option.py", "--test-integer=text"])
@@ -95,6 +101,7 @@ class TestOption(unittest.TestCase):
self.assertRaises(TypeError, option.OptionGroup)
def testStandardError(self):
+ self._create_group()
sio = StringIO()
old_stderr = sys.stderr
sys.stderr = sio