Skip to content

Make testsuite pass with -B/DONTWRITEBYTECODE set. #55629

Closed

Description

@Yhg1s
BPO 11420
Nosy @Yhg1s, @warsaw, @ncoghlan, @ezio-melotti, @merwok, @berkerpeksag
Files
  • py31-dontwritebytecode.diff
  • py32-dontwritebytecode.diff
  • issue11420.diff: Patch against 3.2.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ezio-melotti'
    closed_at = <Date 2013-03-16.19:51:38.169>
    created_at = <Date 2011-03-06.23:48:08.810>
    labels = ['type-bug', 'tests']
    title = 'Make testsuite pass with -B/DONTWRITEBYTECODE set.'
    updated_at = <Date 2013-03-16.19:51:38.167>
    user = 'https://github.com/Yhg1s'

    bugs.python.org fields:

    activity = <Date 2013-03-16.19:51:38.167>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-03-16.19:51:38.169>
    closer = 'ezio.melotti'
    components = ['Tests']
    creation = <Date 2011-03-06.23:48:08.810>
    creator = 'twouters'
    dependencies = []
    files = ['21036', '21037', '29405']
    hgrepos = []
    issue_num = 11420
    keywords = ['patch']
    message_count = 8.0
    messages = ['130204', '130283', '184131', '184159', '184205', '184281', '184346', '184347']
    nosy_count = 7.0
    nosy_names = ['twouters', 'barry', 'ncoghlan', 'ezio.melotti', 'eric.araujo', 'python-dev', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue11420'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    Activity

    1. Yhg1s commented on Mar 6, 2011

      @Yhg1s
      MemberAuthor

      This patch tweaks a few tests that currently rely on .pyc files being written, causing them to fail (or crash) when running 'make test TESTPYTHONOPTS=-B'. All these are purely test failures, not failures in the tested code (unlike issue bpo-11417, which is a failure in bdist_rpm instead of the test.)

      (This patch is for 3.1; the patch for 3.2/default is slightly different. I also have the same patch for Python 2.6/2.7, but I'm not sure if it's worth applying.)

    2. added
      tests
      on Mar 6, 2011
    3. Yhg1s commented on Mar 7, 2011

      @Yhg1s
      MemberAuthor

      As per issue bpo-11417, updated to also skip the tests in distutils/tests/test_bdist_rpm.py when not writing bytecode.

    4. ezio-melotti commented on Mar 14, 2013

      @ezio-melotti
      Member

      Attached an updated patch against 3.2.

    5. added
      type-bug
      on Mar 14, 2013
    6. berkerpeksag commented on Mar 14, 2013

      @berkerpeksag
      Member

      +skip_if_dont_write_bytecode = unittest.skipIf(
      + sys.dont_write_bytecode,
      + "test meaningful only when writing bytecode")

      Maybe this could be added to the test.support module?

    7. ezio-melotti commented on Mar 14, 2013

      @ezio-melotti
      Member

      There are a couple more tests elsewhere that use @skipIf(sys.dont_write_bytecode, ...) directly, but I don't think it's generic enough to be moved to test.support.

    8. merwok commented on Mar 16, 2013

      @merwok
      Member

      Looks fine.

      Can this go into 2.7 too?

    9. python-dev commented on Mar 16, 2013

      python-devmannequin
      Mannequin

      New changeset 2370ae9ee052 by Ezio Melotti in branch '3.2':
      bpo-11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters.
      http://hg.python.org/cpython/rev/2370ae9ee052

      New changeset c70746a0291f by Ezio Melotti in branch '2.7':
      bpo-11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters.
      http://hg.python.org/cpython/rev/c70746a0291f

      New changeset 5aa5bebcd768 by Ezio Melotti in branch '3.3':
      bpo-11420: merge with 3.2.
      http://hg.python.org/cpython/rev/5aa5bebcd768

      New changeset 0a15a58ac4a1 by Ezio Melotti in branch 'default':
      bpo-11420: merge with 3.3.
      http://hg.python.org/cpython/rev/0a15a58ac4a1

    10. ezio-melotti commented on Mar 16, 2013

      @ezio-melotti
      Member

      This should be fixed now.

    11. self-assigned this
      on Mar 16, 2013
    12. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    teststype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions