-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed test for Python3.11 and Python3.12
Generalized implementation
- Loading branch information
Showing
8 changed files
with
189 additions
and
157 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import json | ||
import tempfile | ||
import unittest | ||
from pathlib import Path | ||
|
||
|
||
from exasol_python_test_framework.exatest.utils import obj_from_json_file | ||
from exasol_python_test_framework.exatest.test import run_selftest | ||
|
||
|
||
class UtilsTest(unittest.TestCase): | ||
def test_info_object(self): | ||
with tempfile.TemporaryDirectory() as tmpdirname: | ||
sample_dict = {"a": {"b": {"c": 100}}} | ||
tmp_file = Path(tmpdirname) / "tmp.json" | ||
with open (tmp_file, "w") as f: | ||
json.dump(sample_dict, f) | ||
o = obj_from_json_file(tmp_file) | ||
self.assertEqual(o.a.b.c, 100) | ||
|
||
|
||
if __name__ == '__main__': | ||
run_selftest() |