Index: Lib/test/test_compileall.py =================================================================== --- Lib/test/test_compileall.py (revision 87048) +++ Lib/test/test_compileall.py (working copy) @@ -247,6 +247,17 @@ sourcefile = os.path.join(self.pkgdir, '__init__.py') self.assertTrue(os.path.exists(imp.cache_from_source(sourcefile))) + def test_multiple_dirs(self): + pkgdir2 = os.path.join(self.directory, 'foo2') + os.mkdir(pkgdir2) + open(os.path.join(pkgdir2, '__init__.py'), 'w').close() + open(os.path.join(pkgdir2, 'bar2.py'), 'w').close() + retcode = subprocess.call( + (sys.executable, '-m', 'compileall', self.pkgdir, pkgdir2)) + self.assertEqual(retcode, 0) + self.assertTrue(os.path.exists(os.path.join(self.pkgdir, '__pycache__'))) + self.assertTrue(os.path.exists(os.path.join(pkgdir2, '__pycache__'))) + def test_main(): support.run_unittest(