~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/tests/test_bzrlib.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-09-08 07:23:12 UTC
  • mfrom: (9362.1.3 trivial)
  • Revision ID: launchpad@pqm.canonical.com-20090908072312-0wdzzo8sk04aesrq
[testfix][r=jml][ui=none][bug=385040] Fail if Bazaar or Storm is
        being used without C extensions active

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
"""Launchpad specific tests of bzrlib behavior."""
 
5
 
 
6
__metaclass__ = type
 
7
 
 
8
import unittest
 
9
 
 
10
from lp.testing import TestCase
 
11
 
 
12
 
 
13
class TestBzrlib(TestCase):
 
14
    def test_has_cextensions(self):
 
15
        """Ensure Bazaar C extensions are being used."""
 
16
        try:
 
17
            import bzrlib._dirstate_helpers_pyx
 
18
        except ImportError:
 
19
            self.fail("Bzr not built with C extensions.")
 
20
 
 
21
 
 
22
def test_suite():
 
23
    return unittest.TestLoader().loadTestsFromName(__name__)