Пример #1
0
    def testTwoFiles(self):
        tmp = Concatenater()

        files = [
            os.path.join(TEST_DATA, '%d.data' % num) for num in range(1, 3)
        ]
        tmp.concat(files, self.result)
        self.assertResultEquals('1\n2\n')
Пример #2
0
    def testOrdering(self):
        tmp = Concatenater()

        files = [
            os.path.join(TEST_DATA, '%d.data' % num)
            for num in reversed(range(1, 5))
        ]
        tmp.concat(files, self.result)
        self.assertResultEquals('4\n3\n2\n1\n')
 def testOrdering( self ):
     tmp     = Concatenater()
     
     files   = [ os.path.join( TEST_DATA, '%d.data' % num ) for num in reversed( range( 1, 5 ) ) ]
     tmp.concat( files, self.result )
     self.assertResultEquals( '4\n3\n2\n1\n' )
 def testTwoFiles( self ):
     tmp     = Concatenater()
     
     files   = [ os.path.join( TEST_DATA, '%d.data' % num ) for num in range( 1, 3 ) ]
     tmp.concat( files, self.result )
     self.assertResultEquals( '1\n2\n' )
 def testOneFile( self ):
     tmp     = Concatenater()
     files   = [ os.path.join( TEST_DATA, '1.data' ) ]
     tmp.concat( files, self.result )
     self.assertResultEquals( '1\n' )
Пример #6
0
 def testOneFile(self):
     tmp = Concatenater()
     files = [os.path.join(TEST_DATA, '1.data')]
     tmp.concat(files, self.result)
     self.assertResultEquals('1\n')