[Python-checkins] distutils2: added a test for Distribution(attrs={'options'=...})
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:47 CEST 2010
tarek.ziade pushed bda950874d27 to distutils2:
http://hg.python.org/distutils2/rev/bda950874d27
changeset: 481:bda950874d27
parent: 392:689ec6a55b14
user: Yannick Gingras <ygingras at ygingras.net>
date: Fri Jul 30 00:38:16 2010 -0400
summary: added a test for Distribution(attrs={'options'=...})
files: src/distutils2/tests/test_dist.py
diff --git a/src/distutils2/tests/test_dist.py b/src/distutils2/tests/test_dist.py
--- a/src/distutils2/tests/test_dist.py
+++ b/src/distutils2/tests/test_dist.py
@@ -176,6 +176,21 @@
self.assertEqual(len(warns), 0)
+ def test_non_empty_options(self):
+ # TODO: how to actually use options is not documented except
+ # for a few cryptic comments in dist.py. If this is to stay
+ # in the public API, it deserves some better documentation.
+
+ # Here is an example of how it's used out there:
+ # http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#specifying-customizations
+ cls = Distribution
+ dist = cls(attrs={'author': 'xxx',
+ 'name': 'xxx',
+ 'version': 'xxx',
+ 'url': 'xxxx',
+ 'options': dict(sdist=dict(owner="root"))})
+ self.assertTrue("owner" in dist.get_option_dict("sdist"))
+
def test_finalize_options(self):
attrs = {'keywords': 'one,two',
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list