[Python-checkins] python/dist/src/Lib/distutils/tests
test_build_py.py, 1.2, 1.3
fdrake at users.sourceforge.net
fdrake at users.sourceforge.net
Wed Jul 21 20:53:09 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/distutils/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30525
Modified Files:
test_build_py.py
Log Message:
elaborate package data test to make sure get_outputs() gives the right
results when byte-code compilation is requested (in particular, make
sure that package data doesn't get a bogus byte-code listing
generated)
Index: test_build_py.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/tests/test_build_py.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_build_py.py 25 Jun 2004 19:04:20 -0000 1.2
--- test_build_py.py 21 Jul 2004 18:53:06 -0000 1.3
***************
*** 35,38 ****
--- 35,39 ----
cmd = build_py(dist)
+ cmd.compile = 1
cmd.ensure_finalized()
self.assertEqual(cmd.package_data, dist.package_data)
***************
*** 40,47 ****
cmd.run()
! self.assertEqual(len(cmd.get_outputs()), 2)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
self.assert_("__init__.py" in files)
self.assert_("README.txt" in files)
--- 41,53 ----
cmd.run()
! # This makes sure the list of outputs includes byte-compiled
! # files for Python modules but not for package data files
! # (there shouldn't *be* byte-code files for those!).
! #
! self.assertEqual(len(cmd.get_outputs()), 3)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
self.assert_("__init__.py" in files)
+ self.assert_("__init__.pyc" in files)
self.assert_("README.txt" in files)
More information about the Python-checkins
mailing list