Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
chore: add testing (ongoing)
- Loading branch information
Showing
6 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .knora import KnoraError | ||
from .knora import Knora | ||
from .knora import Sipi | ||
from .knora import BulkImport | ||
from .knora import IrisLookup | ||
from .knora import ListsLookup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ setuptools | |
wheel | ||
tqdm | ||
twine | ||
pytest |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import pytest | ||
|
||
# we reuse a bit of pytest's own testing machinery, this should eventually come | ||
# from a separatedly installable pytest-cli plugin. | ||
pytest_plugins = ["pytester"] | ||
|
||
@pytest.fixture | ||
def run(testdir): | ||
def do_run(*args): | ||
args = ["knora-create-ontology"] + list(args) | ||
return testdir._run(*args) | ||
return do_run | ||
|
||
|
||
def test_create_test_onto(tmpdir, run): | ||
input = tmpdir.join("test-onto.json") | ||
result = run(input) | ||
assert result.ret == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters