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: distutils.tests.test_register.RegisterTestCase.test_strict fails
Type: Stage:
Components: Distutils, Tests Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: tarek Nosy List: Arfrever, eric.araujo, tarek
Priority: normal Keywords: patch

Created on 2010-06-12 03:31 by Arfrever, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
distutils.patch Arfrever, 2010-06-12 03:37 Patch review
Messages (8)
msg107623 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2010-06-12 03:31
$ python3.2 -m distutils.tests.test_register
.......E
======================================================================
ERROR: test_strict (__main__.RegisterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/distutils/tests/test_register.py", line 227, in test_strict
    inputs = RawInputs('1', 'tarek', 'y')
NameError: global name 'RawInputs' is not defined

----------------------------------------------------------------------
Ran 8 tests in 0.242s

FAILED (errors=1)

After replacing RawInputs with Inputs:
$ python3.2 -m distutils.tests.test_register
.......E
======================================================================
ERROR: test_strict (__main__.RegisterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/distutils/tests/test_register.py", line 231, in test_strict
    cmd.run()
  File "/usr/lib64/python3.2/distutils/command/register.py", line 53, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python3.2/distutils/cmd.py", line 315, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.2/distutils/dist.py", line 965, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.2/distutils/command/check.py", line 72, in run
    raise DistutilsSetupError('The docutils package is needed.')
distutils.errors.DistutilsSetupError: The docutils package is needed.

----------------------------------------------------------------------
Ran 8 tests in 0.245s

FAILED (errors=1)

After fixing import, the test interactively asks for username.
msg107624 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2010-06-12 03:37
I noticed that register_module.raw_input also should be renamed to register_module.input. The test passes with the new patch.
msg107636 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-12 09:09
I can’t reproduce with current svn checkout.
msg107647 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2010-06-12 12:42
You would have to install docutils.
msg107648 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-12 13:00
After converting docutils through 2to3 *sigh* and making it visible to 3.2, I get only one failure: NameError: global name 'RawInputs' is not defined

The DistutilsSetupError (“The docutils package is needed.”) also happens with 2.7, although “pydoc2.7 docutils” tells me it’s installed fine. Should we make that two bugs?
msg107650 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2010-06-12 13:09
'python3.2 setup.py build' automatically uses 2to3. You should use docutils trunk. docutils-0.6 has many bugs in support for Python 3.

I have docutils installed (using Portage, Gentoo's package manager) for Python 2.6, 2.7, 3.1 and 3.2 and all tests from distutils.tests.test_register pass for me with Python 2.6 and 2.7.
msg107652 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-12 13:22
Since I already had docutils for my system 2.6 version, I just copied it
all and converted it for 3.2. I prefer not to use software that’s not
available through my system package manager, but that’s hardly relevant
here :)

So, if the io import is fixed, I guess the only remaining issue is the
docutils import. What about raising SkipTest instead of returning?
msg117911 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-10-03 14:34
done in r85197 / r85198

Thanks !
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53226
2010-10-03 14:34:02tareksetstatus: open -> closed
resolution: fixed
messages: + msg117911
2010-06-12 13:22:29eric.araujosetmessages: + msg107652
2010-06-12 13:09:52Arfreversetmessages: + msg107650
2010-06-12 13:00:24eric.araujosetmessages: + msg107648
2010-06-12 12:42:13Arfreversetmessages: + msg107647
2010-06-12 09:09:07eric.araujosetnosy: + eric.araujo
messages: + msg107636
2010-06-12 03:37:43Arfreversetfiles: - distutils.patch
2010-06-12 03:37:17Arfreversetfiles: + distutils.patch

messages: + msg107624
2010-06-12 03:31:26Arfrevercreate