This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients iritkatriel, jaraco
Date 2021-07-03.16:32:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625329952.48.0.708617690642.issue44461@roundup.psfhosted.org>
In-reply-to
Content
I've close PR26937 since we're not going for that. The test from it might still be useful, so I'm copying it here:

    def test_package_without_a_main(self):
        pkg_name = 't_pkg'
        module_name = 't_main'
        os_helper.rmtree(pkg_name)
        modpath = pkg_name + '/' + module_name
        os.makedirs(modpath)
        with open(modpath + '/__init__.py', 'w') as f:
            pass
        self.addCleanup(os_helper.rmtree, pkg_name)
        stdout, stderr = self._run_pdb(['-m', modpath.replace('/', '.')], "")
        self.assertIn(
            "'t_pkg.t_main' is a package and cannot be directly executed",
            stdout)
History
Date User Action Args
2021-07-03 16:32:32iritkatrielsetrecipients: + iritkatriel, jaraco
2021-07-03 16:32:32iritkatrielsetmessageid: <1625329952.48.0.708617690642.issue44461@roundup.psfhosted.org>
2021-07-03 16:32:32iritkatriellinkissue44461 messages
2021-07-03 16:32:32iritkatrielcreate