diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-06 15:39:13 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-06 15:39:13 -0700 |
commit | 7b5f69de3f7b52b718507fe16c2560901e48a70c (patch) | |
tree | 66dc1930c069e34ed7ed45113b033d66721a5728 /attoconf/tests | |
parent | 9532822afccc8db328e07992313d458192f2a367 (diff) | |
download | attobuild-7b5f69de3f7b52b718507fe16c2560901e48a70c.tar.gz attobuild-7b5f69de3f7b52b718507fe16c2560901e48a70c.tar.bz2 attobuild-7b5f69de3f7b52b718507fe16c2560901e48a70c.tar.xz attobuild-7b5f69de3f7b52b718507fe16c2560901e48a70c.zip |
Refactor checks and vars
Diffstat (limited to 'attoconf/tests')
-rw-r--r-- | attoconf/tests/test_core.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/attoconf/tests/test_core.py b/attoconf/tests/test_core.py index c10e8c7..fbbe622 100644 --- a/attoconf/tests/test_core.py +++ b/attoconf/tests/test_core.py @@ -20,7 +20,7 @@ from __future__ import print_function, division, absolute_import import unittest from attoconf.core import Project, Build -from attoconf.types import uint, shell_word +from attoconf.types import uint, shell_word, shell_partial_word from cStringIO import StringIO import sys @@ -95,14 +95,14 @@ General: self.assertEquals(build.relative_source(), '../foo') def test_configure(self): - def check_foo(bld, foo): - self.assertEqual(foo, 'B') - def check_bar(bld, bar): - self.assertEqual(bar, 1) - def check_qux(bld, qux): - self.assertEqual(qux, None) - def check_var(bld, var): - self.assertEqual(var, 'value') + def check_foo(bld, FOO): + self.assertEqual(FOO, 'B') + def check_bar(bld, BAR): + self.assertEqual(BAR, 1) + def check_qux(bld, QUX): + self.assertEqual(QUX, None) + def check_var(bld, VAR): + self.assertEqual(VAR, 'value') proj = Project('.') proj.add_alias('--alias', ['--foo=A', '--bar=1', '--foo=B'], @@ -117,7 +117,7 @@ General: type=uint, check=check_qux, help='help for int qux', hidden=False) proj.add_option('VAR', init='', - type=shell_word, check=check_var, + type=shell_partial_word, check=check_var, help='help for string VAR', hidden=False) build = Build(proj, '.') |