Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildbot failures in test_site #49566

Closed
pitrou opened this issue Feb 19, 2009 · 6 comments
Closed

Buildbot failures in test_site #49566

pitrou opened this issue Feb 19, 2009 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Feb 19, 2009

BPO 5316
Nosy @pitrou, @ericvsmith, @tarekziade
Files
  • part_of_fix.patch
  • 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/tarekziade'
    closed_at = <Date 2009-02-25.22:33:15.038>
    created_at = <Date 2009-02-19.15:37:18.983>
    labels = ['tests', 'type-bug', 'library']
    title = 'Buildbot failures in test_site'
    updated_at = <Date 2009-02-25.22:33:15.037>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2009-02-25.22:33:15.037>
    actor = 'tarek'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2009-02-25.22:33:15.038>
    closer = 'tarek'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2009-02-19.15:37:18.983>
    creator = 'pitrou'
    dependencies = []
    files = ['13177']
    hgrepos = []
    issue_num = 5316
    keywords = ['patch']
    message_count = 6.0
    messages = ['82477', '82606', '82607', '82717', '82723', '82725']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'ocean-city', 'eric.smith', 'tarek']
    pr_nums = []
    priority = 'high'
    resolution = None
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5316'
    versions = ['Python 3.1', 'Python 2.7']

    @pitrou
    Copy link
    Member Author

    pitrou commented Feb 19, 2009

    Recently, some buildbot failures have started appearing on trunk and
    py3k with the following error:

    ======================================================================
    FAIL: test_s_option (test.test_site.HelperFunctionsTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File
    "/home/pybot/buildarea/3.x.klose-ubuntu-i386/build/Lib/test/test_site.py",
    line 105, in test_s_option
        self.assertEqual(rc, 1)
    AssertionError: 0 != 1

    make: *** [buildbottest] Error 1

    @pitrou pitrou added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Feb 19, 2009
    @pitrou
    Copy link
    Member Author

    pitrou commented Feb 22, 2009

    I manage to reproduce it by running test_site just after test_distutils:

    ./python -E -tt -m test.regrtest -uall -l -w test_distutils test_site

    It could be related to test_distutils modifying an environment variable
    without restoring it at the end.

    @ericvsmith
    Copy link
    Member

    Trial and error shows it's test_sdist.py.

    @ocean-city
    Copy link
    Mannequin

    ocean-city mannequin commented Feb 25, 2009

    Probably attached patch will fix this issue. But this patch doesn't
    cover other similar problematic codes.

    It seems this is multi inheritance problem. Following code shows B.setUp
    and B.tearDown are called twice respectively. (In this issue, B
    represents PyPIRCCommandTestCase)

    class A(object): # LoggingSilencer
        def setUp(self):
            print "A setup"
            super(A, self).setUp()
        def tearDown(self):
            print "A tearDown"
            super(A, self).tearDown()
    
    class B: # PyPIRCCommandTestCase
        def setUp(self):
            print "B setup"
        def tearDown(self):
            print "B tearDown"
    
    class C(A, B): # sdistTestCase
        def setUp(self):
            A.setUp(self)
            B.setUp(self)
        def tearDown(self):
            A.tearDown(self)
            B.tearDown(self)
    
    c = C()
    c.setUp()
    c.tearDown()

    """
    A setup
    B setup
    B setup # called twice
    A tearDown
    B tearDown
    B tearDown # ditto
    """

    P.S. This is first time I saw the behavior of super in multi
    inheritance. Movement of code flaw is interesting and fresh for me. :-)

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 25, 2009

    right, subclasses must use super if their superclasses do.

    I'll apply Hirozaku patch (thanks).

    I might also simplify distutil base test class to avoid Mixins.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 25, 2009

    applied in r69976 and r69977

    @tarekziade tarekziade mannequin closed this as completed Feb 25, 2009
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants