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.

classification
Title: test_tools assumes BUILDDIR=SRCDIR
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: eric.araujo, ned.deily, ronaldoussoren, rpetrov
Priority: normal Keywords: easy, needs review, patch

Created on 2012-04-06 10:22 by ronaldoussoren, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_tools.patch ronaldoussoren, 2012-04-06 10:22 review
Messages (8)
msg157655 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-04-06 10:22
When I run "make tests" I get (amongst others) the following test failure:

======================================================================
FAIL: test_noargs (test.test_tools.ReindentTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ronald/Projects/python/rw/default/Lib/test/test_tools.py", line 30, in test_noargs
    assert_python_ok(self.script)
  File "/Users/ronald/Projects/python/rw/default/Lib/test/script_helper.py", line 53, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/Users/ronald/Projects/python/rw/default/Lib/test/script_helper.py", line 45, in _assert_python
    "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 2, stderr follows:
/Users/ronald/Projects/python/rw/default/build/python.exe: can't open file '/Users/ronald/Projects/python/rw/default/build/Tools/scripts/reindent.py': [Errno 2] No such file or directory


This is because the script is actually "/Users/ronald/Projects/python/rw/default/Tools/scripts/reindent.py".

The attached patch fixes the issue.

(assigned to eric because he introduced these tests, unless there are objections I'll commit during the weekend)
msg157667 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-04-06 15:02
Thanks for catching this.  The definition of projectbase and srcdir is not clear to me, I always have to use trial and error to find the right one in my tests.  The patch must be applied to all three branches; let me know if I should do it.
msg157696 - (view) Author: Roumen Petrov (rpetrov) * Date: 2012-04-06 21:45
another one is in Lib/packaging/tests/support.py - should be from same commit
msg178466 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-12-29 02:55
Looks like this issue was addressed with 6d0c54b99ca9 (2.7), 5493299df0a0 (3.2) and c23b442b5d5e (default).  Close?
msg178624 - (view) Author: Roumen Petrov (rpetrov) * Date: 2012-12-30 22:43
No - it is broken.
msg178650 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 07:59
Test_tools passes for me with the tip of the default branch and BUILDDIR!=SRCDIR.

I'm currently running a 2.7 test run, but AFAIK this issue is fixed.
msg178652 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 08:21
2.7 works as well. 

Roumen: what doesn't work and how can we reproduce that?
msg181667 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013-02-08 11:42
I've closed the issue because I can no longer reproduce the issue, the changesets mentioned by Ned have fixed the problem.
History
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58721
2013-02-08 11:42:34ronaldoussorensetstatus: pending -> closed

messages: + msg181667
2012-12-31 08:21:26ronaldoussorensetstatus: open -> pending
resolution: fixed
messages: + msg178652

stage: needs patch -> resolved
2012-12-31 07:59:51ronaldoussorensetmessages: + msg178650
2012-12-30 22:43:33rpetrovsetmessages: + msg178624
2012-12-29 02:55:26ned.deilysetnosy: + ned.deily
messages: + msg178466
2012-04-06 21:45:49rpetrovsetnosy: + rpetrov
messages: + msg157696
2012-04-06 15:02:10eric.araujosetmessages: + msg157667
versions: + Python 2.7, Python 3.2
2012-04-06 10:22:09ronaldoussorencreate