Message338934
| 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 |
<1553651731.06.0.485854699573.issue14817@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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 = 'foo.bar'
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 = 'datetime.date'
self.assertEqual(['path'], pkgutil.extend_path(path, name))
I would move forward if we agreed. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2019年03月27日 01:55:31 | Windson Yang | set | recipients:
+ Windson Yang, pitrou, eric.smith, Arfrever |
| 2019年03月27日 01:55:31 | Windson Yang | set | messageid: <1553651731.06.0.485854699573.issue14817@roundup.psfhosted.org> |
| 2019年03月27日 01:55:31 | Windson Yang | link | issue14817 messages |
| 2019年03月27日 01:55:30 | Windson Yang | create |
|