~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_export.py

  • Committer: Parth Malwankar
  • Date: 2010-02-15 10:46:49 UTC
  • mto: This revision was merged to the branch mainline in revision 5048.
  • Revision ID: parth.malwankar@gmail.com-20100215104649-bo4z8rhqvfibnxhj
updated existing upgrade tests to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009-2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 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
63
63
        self.build_tree(['target/', 'target/foo'])
64
64
        self.assertRaises(errors.BzrError, export.export, wt, 'target', format="dir")
65
65
 
 
66
    def test_dir_export_existing_single_file(self):
 
67
        self.build_tree(['dir1/', 'dir1/dir2/', 'dir1/first', 'dir1/dir2/second'])
 
68
        wtree = self.make_branch_and_tree('dir1')
 
69
        wtree.add(['dir2', 'first', 'dir2/second'])
 
70
        wtree.commit('1')
 
71
        export.export(wtree, 'target1', format='dir', subdir='first')
 
72
        self.failUnlessExists('target1/first')
 
73
        export.export(wtree, 'target2', format='dir', subdir='dir2/second')
 
74
        self.failUnlessExists('target2/second')
 
75
        
66
76
    def test_dir_export_files_same_timestamp(self):
67
77
        builder = self.make_branch_builder('source')
68
78
        builder.start_series()