Skip to content
Permalink
Browse files
chore: add runing tests on travis
  • Loading branch information
subotic committed Oct 10, 2019
1 parent 45a524c commit 593ac85be94c58e4b49e1a9e3b624f7561d48930
Showing with 161 additions and 83 deletions.
  1. +3 −0 .gitignore
  2. +10 −0 .travis.yml
  3. +41 −0 BUILD
  4. +3 −0 Makefile
  5. 0 WORKSPACE
  6. +2 −2 knora/create_ontology.py
  7. +79 −68 knora/knora.py
  8. +23 −13 tests/test_knora.py
@@ -105,3 +105,6 @@ venv.bak/
.idea
.vscode
/knora/lists.json

# bazel
/bazel-*
@@ -0,0 +1,10 @@
dist: xenial
sudo: required

services:
- docker

script:
- pyenv shell 3.7.1
- pip3 install -r requirements.txt
- make test
41 BUILD
@@ -0,0 +1,41 @@
py_library(
name = "knora",
srcs = glob(["knora/knora.py"]),
)

py_binary(
name = "knora_create_ontology",
srcs = ["knora/create_ontology.py"],
deps = ["knora"]
)

py_binary(
name = "knora-xml-import",
srcs = ["knora/xml2knora.py"],
deps = ["knora"]
)

py_binary(
name = "knora-reset-triplestore",
srcs = ["knora/reset_triplestore.py"],
deps = ["knora"]
)

py_binary(
name = "knoractl",
srcs = ["knora/knoractl.py"],
deps = ["knora"]
)

py_test(
name = "test_knora",
srcs = ["tests/test_knora.py"],
deps = ["knora"],
)

test_suite(
name = "all_tests",
tests = [
"test_knora",
],
)
@@ -16,6 +16,9 @@ serve-docs: ## serve docs for local viewing
publish-docs: ## build and publish docs to Github Pages
mkdocs gh-deploy

test: ## runs all tests
python3 -m pytest

clean: ## cleans the project directory
rm -rf dist/ build/ knora.egg-info/ .pytest_cache/ site/

Empty file.
@@ -115,8 +115,8 @@ def program(args):
try:
user_iri = con.create_user(username=user["username"],
email=user["email"],
givenName=user["givenName"],
familyName=user["familyName"],
given_name=user["givenName"],
family_name=user["familyName"],
password="password",
lang=user["lang"] if user.get("lang") is not None else "en")
except KnoraError as err:
Loading

0 comments on commit 593ac85

Please sign in to comment.