summaryrefslogtreecommitdiff
path: root/tests/test_option.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2012-03-21 14:45:53 -0300
committerJohan Dahlin <jdahlin@litl.com>2012-03-21 15:48:01 -0300
commitc8bc6ae10cfe8b2eff4204ec2175907a6eb0585a (patch)
tree6b145e6add7e40fe8650cb07bcc064f651aae979 /tests/test_option.py
parent39650906559fcc39b4be406fa7e25c4788d349a3 (diff)
downloadpygobject-c8bc6ae10cfe8b2eff4204ec2175907a6eb0585a.tar.gz
Correct pyflakes warnings/errors
And add a target to make check that runs pyflakes. https://bugzilla.gnome.org/show_bug.cgi?id=672578
Diffstat (limited to 'tests/test_option.py')
-rw-r--r--tests/test_option.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/test_option.py b/tests/test_option.py
index 9233eed9..55f651d2 100644
--- a/tests/test_option.py
+++ b/tests/test_option.py
@@ -6,6 +6,7 @@ import sys
# py3k has StringIO in a different module
try:
from StringIO import StringIO
+ StringIO # pyflakes
except ImportError:
from io import StringIO
@@ -13,8 +14,6 @@ except ImportError:
from gi._glib.option import OptionParser, OptionGroup, OptionValueError, \
make_option, BadOptionError
-from compathelper import _bytes
-
class TestOption(unittest.TestCase):
EXCEPTION_MESSAGE = "This callback fails"
@@ -64,20 +63,17 @@ class TestOption(unittest.TestCase):
options, args = self.parser.parse_args(
["test_option.py", "foo"])
- self.assertEquals(args, ["foo"])
+ self.assertEquals(args, [])
options, args = self.parser.parse_args(
["test_option.py", "foo", "bar"])
- self.assertEquals(args, ["foo", "bar"])
+ self.assertEquals(args, [])
def testParseArgsDoubleDash(self):
options, args = self.parser.parse_args(
["test_option.py", "--", "-xxx"])
#self.assertEquals(args, ["-xxx"])
- def testParseArgs(self):
- options, args = self.parser.parse_args()
-
def testParseArgsGroup(self):
group = self._create_group()