[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: Fixed in r83091. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras
Virgil Dupras added the comment: Brett, I think there's a problem with the tweak you made to the patch. There was already a testcase called RelativeImportTests and you've hidden it (that I why I called it ImportlibRelativeImportTests initially). -- ___

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: Committed in r83090. Tweaked the patch from Virgil slightly so that it sets the flag used by importlib to delineate whether to use __import__ back to its original setting after running the tests. -- resolution: -> accepted status: open -> closed _

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras
Virgil Dupras added the comment: Because importlib is already well tested and that it already has the machinery to test __import__ instead of the importlib code, I suggest that we re-use importlib's relative tests instead. Attached is a patch that does this. I made sure that __import__ was ac

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: Yes, importlib has tests for relative import, but those are only run against importlib and not __import__. Adding Skip's tests and seeing how they differ from what importlib.test.import_.test_relative_imports would be good. -- _

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras
Virgil Dupras added the comment: If I understand the patch correctly, this patch basically add a test for relative imports. I'm pretty sure this is already testes in importlib.test. Brett, am I right? If yes, there's no point in applying this patch. -- nosy: +vdupras ___

[issue8392] unit tests rather light on testing __import__(..., level)

2010-05-20 Thread Skip Montanaro
Changes by Skip Montanaro : -- nosy: -skip.montanaro ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8392] unit tests rather light on testing __import__(..., level)

2010-04-14 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, this is the right sort of thing to kick in our direction. There's a reasonable amount of implicit testing of import's level argument through the relative import tests in test_import and test_runpy, but some explicit tests of direct invocation can't hurt.

[issue8392] unit tests rather light on testing __import__(..., level)

2010-04-14 Thread Éric Araujo
Éric Araujo added the comment: Adding Brett and Nick to nosy, per Misc/maintainers.rst (Disclaimer: I’m new to issue triaging, tell me if I do something wrong.) Regards -- keywords: +needs review nosy: +brett.cannon, merwok, ncoghlan type: -> behavior ___

[issue8392] unit tests rather light on testing __import__(..., level)

2010-04-14 Thread Skip Montanaro
Skip Montanaro added the comment: Unassigning so someone else can pick it up and review to see if this makes sense. -- assignee: skip.montanaro -> ___ Python tracker ___ ___

[issue8392] unit tests rather light on testing __import__(..., level)

2010-04-14 Thread Skip Montanaro
Skip Montanaro added the comment: The attached diff adds a PackageTest class which exercises both "from . import blah" and its __import__() equivalent. The diff is against the release26-maint branch but I suspect it will apply cleanly to trunk and probably py3k. -- keywords: +patch Add

[issue8392] unit tests rather light on testing __import__(..., level)

2010-04-13 Thread Skip Montanaro
New submission from Skip Montanaro : At work we are in the process of migrating from Python 2.4 to 2.6. One bit of Boost.Python code needs to use PyImport_ImportModuleLevel which references the __import__ docs. That describes the use of the level arg. I then went around looking for examples and