Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mafrahm committed Dec 17, 2024
1 parent 2d45359 commit 87bb212
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
import hbw # noqa

# import all tests
# ...
from .test_util import *
from .test_workflow import *
8 changes: 4 additions & 4 deletions tests/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ action() {
if [ -z "${sandbox}" ]; then
echo "testing ${mod} ..."
(
cd "${cf_dir}" && \
python -m unittest "tests.${mod}"
cd "${this_dir}" && \
python -m unittest "${mod}"
)
else
echo "testing ${mod} ..."
(
cd "${cf_dir}" && \
cf_sandbox "${sandbox}" "python -m unittest tests.${mod}"
cd "${this_dir}" && \
cf_sandbox "${sandbox}" "python -m unittest ${mod}"
)
fi
}
Expand Down
8 changes: 4 additions & 4 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ def test_complex_diff(self):
}
result = gather_dict_diff(dict1, dict2)
expected_output = (
"🔄 Modified: age:\n"
" - Old: 25\n"
" - New: 26\n"
"🔄 Modified: skills:\n"
" 🔹 Added: docker: beginner\n"
" 🔄 Modified: python:\n"
" - Old: intermediate\n"
" - New: advanced\n"
" 🔹 Added: docker: beginner\n"
"🔹 Added: hobby: cycling"
"🔄 Modified: age:\n"
" - Old: 25\n"
" - New: 26\n"
)
self.assertEqual(result, expected_output)

Expand Down

0 comments on commit 87bb212

Please sign in to comment.