[issue32419] Add unittest support for pyc projects

2019-03-29 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> unittest fails with "Start directory is not importable" when trying to run sourceless tests ___ Python tracker

[issue32419] Add unittest support for pyc projects

2018-12-30 Thread Martin Panter
Martin Panter added the comment: Seems to be a lot of overlap with Issue 26859 by Xavier. Looks like Xavier included a test case, but Bassemʼs changes on Git Hub seem more thorough in the impementation and doc strings. -- nosy: +martin.panter ___

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Bassem Girgis
Bassem Girgis added the comment: I Robert, One use scenario is to run deployment tests for sourceless packages and to ensure the integrity of the production environment. Very useful in container environments! In regards to the looking for the __init__ file, it is obvious

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins
Robert Collins added the comment: Whats the use for *unittest* - a tool to help folk develop - to run a test which is only present in sourceless form? -- ___ Python tracker

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins
Robert Collins added the comment: Oh, and why look for __init__ - in part, because it predates namespace packages, but also because unlike regular imports unittest will do negative things like reading the entire filesystem otherwise. --

[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Bassem Girgis
Bassem Girgis added the comment: Please let me know what I need to do in order to close this issue and finally merge the code. -- ___ Python tracker

[issue32419] Add unittest support for pyc projects

2017-12-25 Thread R. David Murray
R. David Murray added the comment: There may be now, but I don't think there was when unittest was written. Also, if someone decided to use namespace packages for tests for some reason, the current check would also probably fail, so it may be worth looking for (or

[issue32419] Add unittest support for pyc projects

2017-12-25 Thread Bassem Girgis
Bassem Girgis added the comment: Hi Eric, Yes it is like David said. For the projects you don't distribute the code with the deployment package, you end up distributing only pyc files. As of how to get these files, you can make use of py_compile or compileall modules. For

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> test needed ___ Python tracker ___

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread R. David Murray
R. David Murray added the comment: Éric: in python3 if no .py is found but a .pyc is found where the .py is expected, it will be imported and run. This supports sourceless package distributions, which is something we only sorta-support :) The change looks simple

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) -Extension Modules nosy: +ezio.melotti, michael.foord, rbcollins versions: -Python 3.6, Python 3.8 ___ Python tracker

[issue32419] Add unittest support for pyc projects

2017-12-23 Thread Éric Araujo
Éric Araujo added the comment: Could you tell more about these projects? In current Python 3 pyc files are in a __pycache__ sub-directory, not directly in the package dir; what tool produces «pyc projects»? -- nosy: +eric.araujo

[issue32419] Add unittest support for pyc projects

2017-12-23 Thread Bassem Girgis
New submission from Bassem Girgis : This PR makes it possible to "unittest" projects that are all pyc with no __init__.py which is hardcoded in few checks in unittest.loader -- components: Extension Modules messages: 308970 nosy: brgirgis priority: normal