aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
m---------src/test/source-package-example0
-rw-r--r--src/test/test_hydrilla_builder.py26
2 files changed, 26 insertions, 0 deletions
diff --git a/src/test/source-package-example b/src/test/source-package-example
new file mode 160000
+Subproject 96b8830c30d9052decaf9aaf99375cf4b5ad719
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 <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