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.
Created on 2012年05月15日 19:19 by eric.smith, last changed 2022年04月11日 14:57 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12871 | open | Windson Yang, 2019年04月18日 03:14 | |
| Messages (10) | |||
|---|---|---|---|
| msg160751 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2012年05月15日 19:19 | |
Subject says it all. There are also no tests of .pkg files. |
|||
| msg160784 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年05月16日 00:46 | |
New changeset 48cb6b67d306 by Eric V. Smith in branch '3.2': Issue #14817: Add rudimentary tests for pkgutil.extend_path. http://hg.python.org/cpython/rev/48cb6b67d306 |
|||
| msg160785 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2012年05月16日 00:48 | |
I'm going to leave this open until better tests are added. The one I did add it very simple, but it's good enough for the changes I'm about to make. |
|||
| msg160792 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2012年05月16日 01:43 | |
This code does not clean up correctly. It needs to remove the added modules in sys.modules. I'll eventually clean it up, once issue 14715 is addressed. |
|||
| msg160809 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年05月16日 07:54 | |
This has broken all 3.x buildbots. |
|||
| msg221843 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年06月29日 13:34 | |
@Eric will you pick this up again? |
|||
| msg338577 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019年03月22日 02:00 | |
I would like to work on this and make a PR. |
|||
| msg338934 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019年03月27日 01:55 | |
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.
|
|||
| msg339764 - (view) | Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) | Date: 2019年04月09日 15:26 | |
@Windson please open a PR for review with your code. |
|||
| msg340465 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019年04月18日 03:16 | |
I added some tests in the PR. Actually, there are some tests for extend_path already (see https://github.com/python/cpython/blob/master/Lib/test/test_pkgutil.py#L235). However, I didn't test every line of the code in the extend_path function. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59022 |
| 2019年07月29日 18:36:31 | nanjekyejoannah | set | nosy:
- nanjekyejoannah |
| 2019年04月18日 03:16:13 | Windson Yang | set | messages: + msg340465 |
| 2019年04月18日 03:14:51 | Windson Yang | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12795 |
| 2019年04月09日 15:26:31 | nanjekyejoannah | set | nosy:
+ nanjekyejoannah messages: + msg339764 |
| 2019年03月27日 01:55:31 | Windson Yang | set | messages: + msg338934 |
| 2019年03月22日 02:00:16 | Windson Yang | set | versions:
+ Python 3.7, Python 3.8, Python 3.9 nosy: + Windson Yang messages: + msg338577 type: enhancement |
| 2019年03月16日 00:05:34 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2014年06月29日 13:34:39 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg221843 |
| 2012年05月17日 16:22:30 | Arfrever | set | nosy:
+ Arfrever |
| 2012年05月16日 07:54:26 | pitrou | set | nosy:
+ pitrou messages: + msg160809 |
| 2012年05月16日 01:43:21 | eric.smith | set | messages: + msg160792 |
| 2012年05月16日 00:48:05 | eric.smith | set | nosy:
- python-dev messages: + msg160785 |
| 2012年05月16日 00:46:18 | python-dev | set | nosy:
+ python-dev messages: + msg160784 |
| 2012年05月15日 19:19:00 | eric.smith | create | |