summaryrefslogtreecommitdiff
path: root/attoconf/tests/test_core.py
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-08-05 15:41:04 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-08-05 15:41:04 -0700
commitd7bb91cd264300351e94e37a84b1de45f2312745 (patch)
tree9464fd72647146c2642ab6b493f858afcfe51566 /attoconf/tests/test_core.py
parent3a475005ce9f48b6bbf45a18660dbed6c4921269 (diff)
downloadattobuild-d7bb91cd264300351e94e37a84b1de45f2312745.tar.gz
attobuild-d7bb91cd264300351e94e37a84b1de45f2312745.tar.bz2
attobuild-d7bb91cd264300351e94e37a84b1de45f2312745.tar.xz
attobuild-d7bb91cd264300351e94e37a84b1de45f2312745.zip
Add a classy API, and use it to implement all the common options
Diffstat (limited to 'attoconf/tests/test_core.py')
-rw-r--r--attoconf/tests/test_core.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/attoconf/tests/test_core.py b/attoconf/tests/test_core.py
index 88bf616..f9854e8 100644
--- a/attoconf/tests/test_core.py
+++ b/attoconf/tests/test_core.py
@@ -47,7 +47,8 @@ class TestProject(unittest.TestCase):
help='display some subset of help', hidden=False,
help_var='TYPE')
proj.help.add_option('--help=hidden',
- 'display help you should never ever ever care about', True)
+ help='display help you should never ever ever care about',
+ hidden=True)
proj.add_option('--foo', init='asdf',
type=str, check=None,
help='set frob target', hidden=False)
@@ -89,7 +90,7 @@ General:
proj = Project('foo/')
build = Build(proj, 'bar/')
self.assertEquals(build.project.srcdir, 'foo')
- self.assertEquals(build.bindir, 'bar')
+ self.assertEquals(build.builddir, 'bar')
self.assertEquals(build.relative_source(), '../foo')
def test_configure(self):
@@ -119,7 +120,12 @@ General:
help='help for string VAR', hidden=False)
build = Build(proj, '.')
- build.configure(['--alias'], {'VAR': 'value'})
+ build.configure(['--alias'],
+ {
+ 'VAR': 'value',
+ 'QUX': 'a',
+ '--qux': 'b',
+ })
self.assertEqual(build.vars,
{
'FOO': ('B', 'command-line'),