def test_compare_file_count(self):
    'Test _compare_file_count raises exception when there is a\n        mismatched file count between 2 dirs list.\n        '
    build.ensure_directory_exists(EMPTY_DIR)
    source_dir_file_count = build.get_file_count(EMPTY_DIR)
    assert (source_dir_file_count == 0)
    target_dir_file_count = build.get_file_count(MOCK_ASSETS_DEV_DIR)
    assert (target_dir_file_count > 0)
    with self.assertRaisesRegexp(ValueError, ('%s files in first dir list != %s files in second dir list' % (source_dir_file_count, target_dir_file_count))):
        build._compare_file_count([EMPTY_DIR], [MOCK_ASSETS_DEV_DIR])
    MOCK_EXTENSIONS_DIR_LIST = [MOCK_EXTENSIONS_DEV_DIR, MOCK_EXTENSIONS_COMPILED_JS_DIR]
    target_dir_file_count = (build.get_file_count(MOCK_EXTENSIONS_DEV_DIR) + build.get_file_count(MOCK_EXTENSIONS_COMPILED_JS_DIR))
    assert (target_dir_file_count > 0)
    with self.assertRaisesRegexp(ValueError, ('%s files in first dir list != %s files in second dir list' % (source_dir_file_count, target_dir_file_count))):
        build._compare_file_count([EMPTY_DIR], MOCK_EXTENSIONS_DIR_LIST)
    build.safe_delete_directory_tree(EMPTY_DIR)
Test _compare_file_count raises exception when there is a
mismatched file count between 2 dirs list.
def test_compare_file_count(self):
    'Test _compare_file_count raises exception when there is a\n        mismatched file count between 2 dirs list.\n        '
    build.ensure_directory_exists(EMPTY_DIR)
    source_dir_file_count = build.get_file_count(EMPTY_DIR)
    assert (source_dir_file_count == 0)
    target_dir_file_count = build.get_file_count(MOCK_ASSETS_DEV_DIR)
    assert (target_dir_file_count > 0)
    with self.assertRaisesRegexp(ValueError, ('%s files in first dir list != %s files in second dir list' % (source_dir_file_count, target_dir_file_count))):
        build._compare_file_count([EMPTY_DIR], [MOCK_ASSETS_DEV_DIR])
    MOCK_EXTENSIONS_DIR_LIST = [MOCK_EXTENSIONS_DEV_DIR, MOCK_EXTENSIONS_COMPILED_JS_DIR]
    target_dir_file_count = (build.get_file_count(MOCK_EXTENSIONS_DEV_DIR) + build.get_file_count(MOCK_EXTENSIONS_COMPILED_JS_DIR))
    assert (target_dir_file_count > 0)
    with self.assertRaisesRegexp(ValueError, ('%s files in first dir list != %s files in second dir list' % (source_dir_file_count, target_dir_file_count))):
        build._compare_file_count([EMPTY_DIR], MOCK_EXTENSIONS_DIR_LIST)
    build.safe_delete_directory_tree(EMPTY_DIR)