def test_generate_build_tasks_to_build_files_from_filepaths(self):
    'Test generate_build_tasks_to_build_files_from_filepaths queues up a\n        corresponding number of build tasks to the number of file changes.\n        '
    new_filename = 'manifest.json'
    recently_changed_filenames = [os.path.join(MOCK_ASSETS_DEV_DIR, new_filename)]
    asset_hashes = build.get_file_hashes(MOCK_ASSETS_DEV_DIR)
    build_tasks = collections.deque()
    self.assertEqual(len(build_tasks), 0)
    build_tasks += build.generate_build_tasks_to_build_files_from_filepaths(MOCK_ASSETS_DEV_DIR, MOCK_ASSETS_OUT_DIR, recently_changed_filenames, asset_hashes)
    self.assertEqual(len(build_tasks), len(recently_changed_filenames))
    build_tasks.clear()
    svg_filepaths = build.get_filepaths_by_extensions(MOCK_ASSETS_DEV_DIR, ('.svg',))
    self.assertGreater(len(svg_filepaths), 0)
    self.assertEqual(len(build_tasks), 0)
    build_tasks += build.generate_build_tasks_to_build_files_from_filepaths(MOCK_ASSETS_DEV_DIR, MOCK_ASSETS_OUT_DIR, svg_filepaths, asset_hashes)
    self.assertEqual(len(build_tasks), len(svg_filepaths))
Test generate_build_tasks_to_build_files_from_filepaths queues up a
corresponding number of build tasks to the number of file changes.
def test_generate_build_tasks_to_build_files_from_filepaths(self):
    'Test generate_build_tasks_to_build_files_from_filepaths queues up a\n        corresponding number of build tasks to the number of file changes.\n        '
    new_filename = 'manifest.json'
    recently_changed_filenames = [os.path.join(MOCK_ASSETS_DEV_DIR, new_filename)]
    asset_hashes = build.get_file_hashes(MOCK_ASSETS_DEV_DIR)
    build_tasks = collections.deque()
    self.assertEqual(len(build_tasks), 0)
    build_tasks += build.generate_build_tasks_to_build_files_from_filepaths(MOCK_ASSETS_DEV_DIR, MOCK_ASSETS_OUT_DIR, recently_changed_filenames, asset_hashes)
    self.assertEqual(len(build_tasks), len(recently_changed_filenames))
    build_tasks.clear()
    svg_filepaths = build.get_filepaths_by_extensions(MOCK_ASSETS_DEV_DIR, ('.svg',))
    self.assertGreater(len(svg_filepaths), 0)
    self.assertEqual(len(build_tasks), 0)
    build_tasks += build.generate_build_tasks_to_build_files_from_filepaths(MOCK_ASSETS_DEV_DIR, MOCK_ASSETS_OUT_DIR, svg_filepaths, asset_hashes)
    self.assertEqual(len(build_tasks), len(svg_filepaths))