Rev 5014: Fix imports in test_smart_add.py. in file:///home/vila/src/bzr/bugs/322767-dont-add-conflict-related-files/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Feb 8 09:50:58 GMT 2010
At file:///home/vila/src/bzr/bugs/322767-dont-add-conflict-related-files/
------------------------------------------------------------
revno: 5014
revision-id: v.ladeuil+lp at free.fr-20100208095058-d65n1m2u0hvayxyu
parent: pqm at pqm.ubuntu.com-20100208085218-xifmoycns98p9el4
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 322767-dont-add-conflict-related-files
timestamp: Mon 2010-02-08 10:50:58 +0100
message:
Fix imports in test_smart_add.py.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_smart_add.py'
--- a/bzrlib/tests/test_smart_add.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_smart_add.py 2010-02-08 09:50:58 +0000
@@ -16,16 +16,15 @@
from cStringIO import StringIO
-from bzrlib import osutils
-from bzrlib.add import (
- AddAction,
- AddFromBaseAction,
+from bzrlib import (
+ add,
+ inventory,
+ osutils,
+ tests,
)
-from bzrlib.tests import TestCase, TestCaseWithTransport
-from bzrlib.inventory import Inventory
-
-
-class AddCustomIDAction(AddAction):
+
+
+class AddCustomIDAction(add.AddAction):
def __call__(self, inv, parent_ie, path, kind):
# The first part just logs if appropriate
@@ -39,7 +38,7 @@
return file_id
-class TestAddFrom(TestCaseWithTransport):
+class TestAddFrom(tests.TestCaseWithTransport):
"""Tests for AddFromBaseAction"""
def make_base_tree(self):
@@ -60,9 +59,9 @@
try:
new_tree.lock_write()
try:
- action = AddFromBaseAction(base_tree, base_path,
- to_file=to_file,
- should_print=should_print)
+ action = add.AddFromBaseAction(base_tree, base_path,
+ to_file=to_file,
+ should_print=should_print)
new_tree.smart_add(file_list, action=action)
finally:
new_tree.unlock()
@@ -144,7 +143,7 @@
self.failIf(a_id in self.base_tree)
-class TestAddActions(TestCase):
+class TestAddActions(tests.TestCase):
def test_quiet(self):
self.run_action("")
@@ -153,11 +152,10 @@
self.run_action("adding path\n")
def run_action(self, output):
- from bzrlib.add import AddAction
from bzrlib.mutabletree import _FastPath
- inv = Inventory()
+ inv = inventory.Inventory()
stdout = StringIO()
- action = AddAction(to_file=stdout, should_print=bool(output))
+ action = add.AddAction(to_file=stdout, should_print=bool(output))
self.apply_redirected(None, stdout, None, action, inv, None,
_FastPath('path'), 'file')
More information about the bazaar-commits
mailing list