aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hydrilla_builder.py
blob: b0541929370f94a57466e8ed6d1003c511107f7e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# SPDX-License-Identifier: CC0-1.0

# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
#
# Available under the terms of Creative Commons Zero v1.0 Universal.

import pytest

from tempfile import TemporaryDirectory
from pathlib import Path

here = Path(__file__).resolve().parent

@pytest.fixture()
def tmpdir():
    with TemporaryDirectory() as tmpdir:
        yield tmpdir

def test_build(tmpdir):
    """Build the sample source package and verify the produced files."""
    from hydrilla_builder.build import Build

    build = Build(here / 'source-package-example', Path('index.json'))
    build.write_package_files(Path(tmpdir))

    # TODO: verify results