From 770f35fd97d209c5a8cbc7d419fc4136312b5c0a Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 31 Aug 2021 13:57:38 +1000 Subject: [PATCH] Move tests outside src, as per convention. See #1711. --- src/ifcopenshell-python/Makefile | 13 +++++++++++++ src/ifcopenshell-python/README.md | 3 +++ .../{ifcopenshell => test}/test_ids.py | 2 +- .../{ifcopenshell => test}/util/test_pset.py | 0 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/ifcopenshell-python/Makefile create mode 100644 src/ifcopenshell-python/README.md rename src/ifcopenshell-python/{ifcopenshell => test}/test_ids.py (99%) rename src/ifcopenshell-python/{ifcopenshell => test}/util/test_pset.py (100%) diff --git a/src/ifcopenshell-python/Makefile b/src/ifcopenshell-python/Makefile new file mode 100644 index 0000000000..13c83f1139 --- /dev/null +++ b/src/ifcopenshell-python/Makefile @@ -0,0 +1,13 @@ +.PHONY: test +test: + pytest -o "testpaths=test" + +.PHONY: coverage +coverage: + coverage run --source ifcopenshell -m pytest + coverage html + xdg-open htmlcov/index.html + +.PHONY: clean +clean: + rm -rf htmlcov diff --git a/src/ifcopenshell-python/README.md b/src/ifcopenshell-python/README.md new file mode 100644 index 0000000000..0bed56e487 --- /dev/null +++ b/src/ifcopenshell-python/README.md @@ -0,0 +1,3 @@ +# ifcopenshell-python + +Python bindings, utility functions, and high-level API for IfcOpenShell. diff --git a/src/ifcopenshell-python/ifcopenshell/test_ids.py b/src/ifcopenshell-python/test/test_ids.py similarity index 99% rename from src/ifcopenshell-python/ifcopenshell/test_ids.py rename to src/ifcopenshell-python/test/test_ids.py index 2684e32937..83c148350a 100644 --- a/src/ifcopenshell-python/ifcopenshell/test_ids.py +++ b/src/ifcopenshell-python/test/test_ids.py @@ -1,5 +1,5 @@ import unittest -import ids +from ifcopenshell import ids # from ids import ids import requests diff --git a/src/ifcopenshell-python/ifcopenshell/util/test_pset.py b/src/ifcopenshell-python/test/util/test_pset.py similarity index 100% rename from src/ifcopenshell-python/ifcopenshell/util/test_pset.py rename to src/ifcopenshell-python/test/util/test_pset.py