Ejemplo n.º 1
0
 def add_six_seven_folder(self, rel_path=False):
     if rel_path:
         src = os.path.join(self.project_dir, 'resources', 'source_files', 'six seven')
     else:
         src = os.path.join(self.src_root, 'six seven')
     dest = os.path.join(self.dest_root, 'six seven')
     backpy.add_directory(backpy.CONFIG_FILE, src, dest)
Ejemplo n.º 2
0
 def add_one_folder(self, rel_path=False):
     if rel_path:
         src = os.path.join(self.project_dir, 'resources', 'source_files',
                            'one')
     else:
         src = os.path.join(self.src_root, 'one')
     dest = os.path.join(self.dest_root, 'one')
     backpy.add_directory(backpy.CONFIG_FILE, src, dest)
Ejemplo n.º 3
0
    def testAddFolderSourceNotFound(self):
        size_before = self.get_file_size(backpy.CONFIG_FILE)
        src = 'test'
        dest = self.dest_root
        backpy.add_directory(backpy.CONFIG_FILE, src, dest)

        size_after = self.get_file_size(backpy.CONFIG_FILE)
        self.assertEqual(size_before, size_after)
Ejemplo n.º 4
0
    def testAddFolderWithSpaces(self):
        size_before = self.get_file_size(backpy.CONFIG_FILE)
        # use rel path for source so can search config file for text
        src = os.path.join('resources', 'source_files', 'six seven')
        dest = os.path.join(self.dest_root, 'six seven')
        backpy.add_directory(backpy.CONFIG_FILE,
                             os.path.join(self.project_dir, src), dest)

        size_after = self.get_file_size(backpy.CONFIG_FILE)
        self.assertGreater(size_after, size_before)
        self.assertTrue(self.text_in_file(backpy.CONFIG_FILE, src))