~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bad_files.py

  • Committer: wang
  • Date: 2006-10-29 13:41:32 UTC
  • mto: (2104.4.1 wang_65714)
  • mto: This revision was merged to the branch mainline in revision 2109.
  • Revision ID: wang@ubuntu-20061029134132-3d7f4216f20c4aef
Replace python's difflib by patiencediff because the worst case 
performance is cubic for difflib and people commiting large data 
files are often hurt by this. The worst case performance of patience is 
quadratic. Fix bug 65714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
 
1
# Copyright (C) 2005 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
"""Tests being able to ignore mad filetypes.
19
19
"""
20
20
 
21
 
from bzrlib import ignores
22
21
from bzrlib.tests import TestCaseWithTransport
23
22
from bzrlib.errors import BadFileKindError
24
23
import os
58
57
        # put some bogus stuff in the tree
59
58
 
60
59
        # We can only continue if we have mkfifo
61
 
        if not hasattr(os, 'mkfifo'):
 
60
        if getattr(os, 'mkfifo', None) is None:
62
61
            # TODO: Ultimately this should be TestSkipped
63
62
            # or PlatformDeficiency
64
63
            return
65
64
 
66
 
        # Ignore the .bazaar/ home directory that is created
67
 
        ignores._set_user_ignores(['./.bazaar'])
68
 
 
69
65
        # status with nothing
70
66
        verify_status(self, wt, [])
71
67