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 Windson Yang
Recipients Arfrever, Windson Yang, eric.smith, pitrou
Date 2019-03-27.01:55:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
My base idea would be some unittests for the function like:

class ExtendPathBaseTests(unittest.TestCase):
    def test_input_string(self):
        path = 'path'
        name = 'foo'
        self.assertEqual('path', pkgutil.extend_path(path, name))

    def test_parent_package_raise_key_error(self):
        path = ['path']
        # sys.modules['foo'] raise KeyError
        name = ''
        self.assertEqual(['path'], pkgutil.extend_path(path, name))

    def test_parent_package_raise_attr_error(self):
        path = ['path']
        # datetime module don't have __path__ attr
        name = ''
        self.assertEqual(['path'], pkgutil.extend_path(path, name))

I would move forward if we agreed.
Date User Action Args
2019-03-27 01:55:31Windson Yangsetrecipients: + Windson Yang, pitrou, eric.smith, Arfrever
2019-03-27 01:55:31Windson Yangsetmessageid: <>
2019-03-27 01:55:31Windson Yanglinkissue14817 messages
2019-03-27 01:55:30Windson Yangcreate