[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2012-09-18 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-03-14 Thread Ezio Melotti
Ezio Melotti added the comment: The cleanups have been committed in r78719 (trunk) and r78723 (py3k). -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-03-06 Thread Éric Araujo
Éric Araujo added the comment: Hello One advice against using __file__: http://lists.debian.org/debian-python/2010/01/msg00172.html Regards -- nosy: +merwok ___ Python tracker ___

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-18 Thread Ezio Melotti
Ezio Melotti added the comment: Ported to py3k in r78214. I will think about the cleanups later, they are not so important right now. -- ___ Python tracker ___ _

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-13 Thread Florent Xicluna
Florent Xicluna added the comment: "Complex is better than complicated... Special cases aren't special enough to break the rules." The module "regrtest" is complex enough. We don't need to keep useless hacks inside. It would be more interesting to replace the hack with some words, or an asse

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-12 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure it's safe to remove those hacks, they might be necessary in some corner case. I'll also port this to py3k before closing the issue. -- ___ Python tracker __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-12 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file16219/issue7712_regrtest_rm_hacks.diff ___ Python tracker ___ ___ Python-bu

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-12 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16218/issue7712_regrtest_remove_hacks.diff ___ Python tracker ___ ___ Py

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-12 Thread Florent Xicluna
Florent Xicluna added the comment: Fixed on trunk with r78136. Before closing this issue, we may apply additional cleanup on regrtest: - the "sys.path" hack is not needed anymore (no risk of relative imports) - the hack for sys.argv[0] could be removed too, and use __file__ instead -

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-09 Thread Brian Curtin
Brian Curtin added the comment: With Ezio's latest patch (sent via IRC), test_bufio still fails and additionally test_mailbox fails. If I apply the patch on #7443 along with Ezio's patch, everything looks fine. I haven't thoroughly looked at that issue, but on the surface it looks similar (s

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-09 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16167/issue7712_context_manager_v5.diff ___ Python tracker ___ ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Florent Xicluna
Florent Xicluna added the comment: The command line used to run the tests is important. If you run through "test.regrtest", it should "chdir" to a sandbox directory to run the test. If you call directly the test_bufio.py file, it runs in the current directory (as before the patch). And the per

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Florent Xicluna
Florent Xicluna added the comment: And you could try the patch attached to #7443, and see if it fixes the test_bufio issue. -- ___ Python tracker ___ ___

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Florent Xicluna
Florent Xicluna added the comment: Ok, it may be not related directly with this patch. Can you diagnose if it something like #7443? -- ___ Python tracker ___ ___

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Brian Curtin
Brian Curtin added the comment: Yep, that's the only one failing. The output I attached is the result of running the test alone. -- ___ Python tracker ___ __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Florent Xicluna
Florent Xicluna added the comment: Brian, is it the only one failing? Did you have some test running before? Which one? (alphabetic order?) Do you reproduce the error when running this test alone? "-m test.regrtest -uall test_bufio" -- ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Brian Curtin
Brian Curtin added the comment: With the latest patch I get one failure: test_bufio. I piped that test to a file and attached the results here. There are numerous "Permission denied: @test" IOErrors. -- Added file: http://bugs.python.org/file16181/test_bufio.stdout.txt __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-08 Thread Ezio Melotti
Ezio Melotti added the comment: Final version of the patch, with the temp_cwd context manager added to test_support and used in test_regrtest to run the test suite in a temporary directory. It also includes a fix for test_subprocess that was failing when the tests are not run in the original

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Ezio Melotti
Ezio Melotti added the comment: Almost completed patch, the code should be OK, I just have to add a few comments and check that it works fine in all the situations. -- Added file: http://bugs.python.org/file16175/issue7712v2.diff ___ Python tracker

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Let's fix some other tests. -- Added file: http://bugs.python.org/file16167/issue7712_context_manager_v5.diff ___ Python tracker ___ __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16165/issue7712_context_manager_v4.diff ___ Python tracker ___ ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Florent Xicluna added the comment: Removed the dummy CM hack. Now it should be ready for final review. -- Added file: http://bugs.python.org/file16165/issue7712_context_manager_v4.diff ___ Python tracker __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-07 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16152/issue7712_context_manager_v3a.diff ___ Python tracker ___ ___ Pyth

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Florent Xicluna added the comment: There were syntax errors in the previous patch. Sorry. -- Added file: http://bugs.python.org/file16152/issue7712_context_manager_v3a.diff ___ Python tracker __

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16151/issue7712_context_manager_v3.diff ___ Python tracker ___ ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16150/issue7712_context_manager_v2.diff ___ Python tracker ___ ___ Python

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Florent Xicluna added the comment: Slightly more readable, without 2-spaces indent. -- Added file: http://bugs.python.org/file16151/issue7712_context_manager_v3.diff ___ Python tracker _

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15956/issue7712_context_manager.diff ___ Python tracker ___ ___ Python-bu

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Florent Xicluna added the comment: Patch which fixes the "relative import" issue. ~ $ cd Lib/ ~ $ ../python -m test.regrtest Note: There are some 2-spaces indents for patch readability. Change them before commit. -- versions: -Python 2.6, Python 3.1 Added file: http://bugs.p

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-06 Thread Florent Xicluna
Florent Xicluna added the comment: It looks fine. Few comments: - "{}_python_{}" could be better, to identify the culprit for leftover directories. - the warning message may be more specific: "warnings.warn('tests may fail, unable to switch to ' + name, RuntimeWarning, s

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-05 Thread Ezio Melotti
Ezio Melotti added the comment: Here is a patch based on the previous patches and some discussion. I still have to test it better and add a few comments, but it should be almost ok. -- Added file: http://bugs.python.org/file16146/issue7712.diff ___

[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-05 Thread Florent Xicluna
Changes by Florent Xicluna : -- title: Add a context manager to change cwd in test.test_support -> Add a context manager to change cwd in test.test_support and run the test suite in a temp dir. ___ Python tracker