From 5ac7ec33fe4b90110faaab3fb178afa9e6de812c Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 4 Feb 2022 12:08:25 +0100 Subject: initial commit --- src/test/test_hydrilla_builder.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/test/test_hydrilla_builder.py (limited to 'src/test/test_hydrilla_builder.py') diff --git a/src/test/test_hydrilla_builder.py b/src/test/test_hydrilla_builder.py new file mode 100644 index 0000000..b054192 --- /dev/null +++ b/src/test/test_hydrilla_builder.py @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: CC0-1.0 + +# Copyright (C) 2022 Wojtek Kosior +# +# 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 -- cgit v1.2.3