RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 625395 - include the tests/data directory in the python-test rpm
Summary: include the tests/data directory in the python-test rpm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dave Malcolm
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Depends On:
Blocks: 850056
TreeView+ depends on / blocked
 
Reported: 2010-08-19 10:15 UTC by Petr Šplíchal
Modified: 2016-06-01 01:47 UTC (History)
2 users (show)

Fixed In Version: python-2.6.6-13.el6
Doc Type: Bug Fix
Doc Text:
The python-tests subpackage was missing some test files and directories used by the selftests for lib2to3. This update adds the missing content to the subpackage.
Clone Of:
: 850056 (view as bug list)
Environment:
Last Closed: 2011-05-19 11:36:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0554 0 normal SHIPPED_LIVE Moderate: python security, bug fix, and enhancement update 2011-05-19 11:35:29 UTC

Description Petr Šplíchal 2010-08-19 10:15:30 UTC
Description of problem:

Please include the tests/data directory in the python-test package
as it contains files necessary for running some of the unit tests.

Version-Release number of selected component (if applicable):
python-2.6.5-3.el6.x86_64

Steps to Reproduce:
# ./regrtest.py test_lib2to3.py
test_lib2to3
test_lib2to3 skipped -- No module named myfixes
1 test skipped:
    test_lib2to3
1 skip unexpected on linux2:
    test_lib2to3

David Malcom's comment from BZ#583931
https://bugzilla.redhat.com/show_bug.cgi?id=583931#c29

test_lib2to3.py:(see comment #19)
  The tarball has a "Python-2.6.5/Lib/lib2to3/tests/data" subdirectory:
    $ find Python-2.6.5/Lib/lib2to3/tests/data
    Python-2.6.5/Lib/lib2to3/tests/data
    Python-2.6.5/Lib/lib2to3/tests/data/different_encoding.py
    Python-2.6.5/Lib/lib2to3/tests/data/bom.py
    Python-2.6.5/Lib/lib2to3/tests/data/README
    Python-2.6.5/Lib/lib2to3/tests/data/py3_test_grammar.py
    Python-2.6.5/Lib/lib2to3/tests/data/crlf.py
    Python-2.6.5/Lib/lib2to3/tests/data/py2_test_grammar.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/parrot_example.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/__init__.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/bad_order.py
    Python-2.6.5/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py
    Python-2.6.5/Lib/lib2to3/tests/data/infinite_recursion.py

  but this directory doesn't seem to be in our rpms

  From the Python-2.6.5/Lib/lib2to3/tests/data/README:
    In this directory:
    - py2_test_grammar.py -- test file that exercises most/all of Python 2.x's
grammar.
    - py3_test_grammar.py -- test file that exercises most/all of Python 3.x's
grammar.
    - infinite_recursion.py -- test file that causes lib2to3's faster recursive
pattern matching
      scheme to fail, but passes when lib2to3 falls back to iterative pattern
matching.
    - fixes/ -- for use by test_refactor.py


   All of the other files within "Python-2.6.5/Lib/lib2to3/tests" appear to
have made it into our "python" (not "python-test") package within
%{_libdir}/python2.6/lib2to3/tests ; there are no other directories.

  Looking at the build log, within the %install I see the invocation of "make
install" leads to:
    Creating directory /usr/lib64/python2.6/lib2to3
    Creating directory /usr/lib64/python2.6/lib2to3/fixes
    Creating directory /usr/lib64/python2.6/lib2to3/pgen2
    Creating directory /usr/lib64/python2.6/lib2to3/tests
  and later:
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/__init__.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c ./Lib/lib2to3/tests/pytree_idempotency.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/support.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_all_fixers.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_fixers.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_main.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_parser.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_pytree.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_refactor.py
/usr/lib64/python2.6/lib2to3/tests
    /usr/bin/install -c -m 644 ./Lib/lib2to3/tests/test_util.py
/usr/lib64/python2.6/lib2to3/tests

  but nothing relating to /usr/lib64/python2.6/lib2to3/tests/data

  Upstream Makefile.pre.in has "LIBSUBDIRS=" listing various directories
including "lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests"; latest upstream
SVN for 2.7 has added: "lib2to3/tests/data lib2to3/tests/data/fixers
lib2to3/tests/data/fixers/myfixes"

This was fixed upstream (buggily) in:
  http://svn.python.org/view/python/trunk/Makefile.pre.in?r1=71395&r2=71394
and the fix was fixed in these commits:
  http://svn.python.org/view/python/trunk/Makefile.pre.in?r1=71395&r2=71396
  http://svn.python.org/view/python/trunk/Makefile.pre.in?r1=71494&r2=71740

Comment 2 Petr Šplíchal 2011-02-24 14:07:16 UTC
I've noticed the lib2to3 tests are included in the python core
package. All the other tests belong to python-test rpm. Dave, is
that an intentional exception?

# rpm -ql python.x86_64 | grep test
/usr/lib64/python2.6/doctest.py
/usr/lib64/python2.6/doctest.pyc
/usr/lib64/python2.6/doctest.pyo
/usr/lib64/python2.6/lib2to3/tests
/usr/lib64/python2.6/lib2to3/tests/__init__.py
/usr/lib64/python2.6/lib2to3/tests/__init__.pyc
/usr/lib64/python2.6/lib2to3/tests/__init__.pyo
/usr/lib64/python2.6/lib2to3/tests/data
/usr/lib64/python2.6/lib2to3/tests/data/README
/usr/lib64/python2.6/lib2to3/tests/data/bom.py
...
/usr/lib64/python2.6/lib2to3/tests/test_refactor.pyo
/usr/lib64/python2.6/lib2to3/tests/test_util.py
/usr/lib64/python2.6/lib2to3/tests/test_util.pyc
/usr/lib64/python2.6/lib2to3/tests/test_util.pyo
/usr/lib64/python2.6/test
/usr/lib64/python2.6/test/__init__.py
/usr/lib64/python2.6/test/__init__.pyc
/usr/lib64/python2.6/test/__init__.pyo
/usr/lib64/python2.6/test/test_support.py
/usr/lib64/python2.6/test/test_support.pyc
/usr/lib64/python2.6/test/test_support.pyo
/usr/lib64/python2.6/unittest.py
/usr/lib64/python2.6/unittest.pyc
/usr/lib64/python2.6/unittest.pyo

Comment 11 Laura Bailey 2011-05-10 00:21:43 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The python-tests subpackage was missing some test files and directories used by the selftests for lib2to3. This update adds the missing content to the subpackage.

Comment 12 errata-xmlrpc 2011-05-19 11:36:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0554.html

Comment 13 errata-xmlrpc 2011-05-19 13:07:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0554.html


Note You need to log in before you can comment on or make changes to this bug.