~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/upstream_import.py

  • Committer: Aaron Bentley
  • Date: 2007-06-10 17:55:08 UTC
  • mfrom: (531.2.2 bzrtools)
  • Revision ID: aaron.bentley@utoronto.ca-20070610175508-gex1oxvmfv0qoagi
Merge whitespace cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
    import_zip,
15
15
    import_dir,
16
16
    top_directory,
17
 
    ZipFileWrapper, 
 
17
    ZipFileWrapper,
18
18
)
19
19
from bzrlib.tests import TestCaseInTempDir
20
20
 
81
81
                os.chdir('project-0.1')
82
82
            os.mkdir(prefix + 'junk')
83
83
            archive_file.add(prefix + 'junk')
84
 
            
 
84
 
85
85
            f = file(prefix + 'README', 'wb')
86
86
            f.write('What?')
87
87
            f.close()
111
111
            else:
112
112
                prefix=''
113
113
                os.chdir('project-0.2')
114
 
            
 
114
 
115
115
            os.mkdir(prefix + 'junk')
116
116
            archive_file.add(prefix + 'junk')
117
117
 
139
139
 
140
140
        os.mkdir('project-0.2')
141
141
        tar_file.add('project-0.2')
142
 
        
 
142
 
143
143
        f = file('project-0.1/README', 'wb')
144
144
        f.write('What?')
145
145
        f.close()
214
214
        tar_file = self.make_messed_tar()
215
215
        tree = BzrDir.create_standalone_workingtree('tree')
216
216
        import_tar(tree, tar_file)
217
 
        self.assertTrue(tree.path2id('project-0.1/README') is not None) 
 
217
        self.assertTrue(tree.path2id('project-0.1/README') is not None)
218
218
 
219
219
    def test_untar_gzip(self):
220
220
        tar_file = self.make_tar(mode='w:gz')
221
221
        tree = BzrDir.create_standalone_workingtree('tree')
222
222
        import_tar(tree, tar_file)
223
 
        self.assertTrue(tree.path2id('README') is not None) 
 
223
        self.assertTrue(tree.path2id('README') is not None)
224
224
 
225
225
def test_suite():
226
226
    return makeSuite(TestImport)