Skip to content

Commit

Permalink
tests refactored so they can be organized in subdirectories.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmnavarrol committed Mar 10, 2024
1 parent 70c2c09 commit 249c40e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ targets:
@echo -e "\t${C_BOLD}clean:${C_NC} deletes temp files."

test:
python -m unittest discover
python -m unittest discover -s tests

build: test $(SDIST_FILES) $(WHEELS) doc

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setUp(self):
os.makedirs(current_scenario_path)

shutil.copy(
TESTS_PATH + '/subrepos.' + test_item,
TESTS_PATH + '/../helperfiles/subrepos.' + test_item,
os.path.join(current_scenario_path, 'subrepos')
)

Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/tests/subrepos/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Prepares environment for testing

import os, sys

TESTS_PATH = os.path.dirname(os.path.realpath(__file__))
PROJECT_PATH = os.path.abspath(os.path.join(TESTS_PATH, os.pardir))

# Adds project dir to python path so source code can be imported
sys.path.append(PROJECT_PATH)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUp(self):
os.makedirs(current_scenario_path)

shutil.copy(
TESTS_PATH + '/subrepos.' + test_item,
TESTS_PATH + '/../helperfiles/subrepos.' + test_item,
os.path.join(current_scenario_path, 'subrepos')
)

Expand Down

0 comments on commit 249c40e

Please sign in to comment.