TestDebuntuExpansions creatively escapes test isolation

Bug #684662 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

After tweaking the windows babune slave setup to be a better ssh citizen and launchpad user I encounter surprising failures:
http://babune.ladeuil.net:24842/job/selftest-windows/253/
# bzrlib.plugins.launchpad.test_lp_directory.TestDebuntuExpansions.test_bogus_distro
# bzrlib.plugins.launchpad.test_lp_directory.TestDebuntuExpansions.test_trick_bogus_distro_d
# bzrlib.plugins.launchpad.test_lp_directory.TestDebuntuExpansions.test_trick_bogus_distro_u

What ?

It turns out that the following lines contains a pretty way to get rid of the isolation provided by TestCaseInTempDir:

class TestDebuntuExpansions(TestCaseInTempDir):
    """Test expansions for ubuntu: and debianlp: schemes."""

    def setUp(self):
        tests.TestCase.setUp(self)
        self.directory = LaunchpadDirectory()

I'll send a fix.

I don't think we can do much in terms of controlling *what* a setUp method can do as there valid cases (this one isn't of course) for jumping above the inherited one.

Related branches

Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.3b5
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.