Example #1
0
def test_collect_static_assets():
    collect_static_assets(PROJECT_DIR)

    expected_paths = (
        'js/contracts.js',
        'js/web3.js',
        'js/test-assets-dir.js',
        'js/sub-dir/test-assets-sub-dir.js',
        'top-dir/test-top-dir.txt',
    )

    build_assets_dir = get_build_assets_dir(PROJECT_DIR)

    for path in expected_paths:
        asset_path = os.path.join(build_assets_dir, path)
        assert os.path.exists(asset_path)
Example #2
0
def test_collect_static_assets():
    collect_static_assets(PROJECT_DIR)

    expected_paths = (
        'js/contracts.js',
        'js/web3.js',
        'js/test-assets-dir.js',
        'js/sub-dir/test-assets-sub-dir.js',
        'top-dir/test-top-dir.txt',
    )

    build_assets_dir = get_build_assets_dir(PROJECT_DIR)

    for path in expected_paths:
        asset_path = os.path.join(build_assets_dir, path)
        assert os.path.exists(asset_path)
Example #3
0
def clear_build_assets():
    build_assets_path = get_build_assets_dir(PROJECT_DIR)
    if os.path.exists(build_assets_path):
        shutil.rmtree(build_assets_path)
Example #4
0
def clear_build_assets():
    build_assets_path = get_build_assets_dir(PROJECT_DIR)
    if os.path.exists(build_assets_path):
        shutil.rmtree(build_assets_path)