-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Open-EO/hotfix
added code and test for checking file existence;
- Loading branch information
Showing
2 changed files
with
25 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import unittest | ||
from openeo_pg_parser_python.translate_process_graph import translate_graph | ||
|
||
|
||
class PGTranslateTester(unittest.TestCase): | ||
""" Responsible for testing the translation of an openEO process graph. """ | ||
|
||
def setUp(self): | ||
""" Specifies paths to the test data. """ | ||
|
||
self.pg_test_1_filepath = r"process_graphs/test_1.json" | ||
|
||
def test_pg_not_found(self): | ||
pg_filepath = r"process_graphs/does_not_exist.json" | ||
try: | ||
translate_graph(pg_filepath) | ||
except FileNotFoundError: | ||
assert True | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |