Skip to content

Commit 249c40e

Browse files
committed
tests refactored so they can be organized in subdirectories.
1 parent 70c2c09 commit 249c40e

File tree

7 files changed

+12
-3
lines changed

7 files changed

+12
-3
lines changed

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ targets:
3030
@echo -e "\t${C_BOLD}clean:${C_NC} deletes temp files."
3131

3232
test:
33-
python -m unittest discover
33+
python -m unittest discover -s tests
3434

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
os.makedirs(current_scenario_path)
2727

2828
shutil.copy(
29-
TESTS_PATH + '/subrepos.' + test_item,
29+
TESTS_PATH + '/../helperfiles/subrepos.' + test_item,
3030
os.path.join(current_scenario_path, 'subrepos')
3131
)
3232

File renamed without changes.

src/tests/subrepos/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Prepares environment for testing
2+
3+
import os, sys
4+
5+
TESTS_PATH = os.path.dirname(os.path.realpath(__file__))
6+
PROJECT_PATH = os.path.abspath(os.path.join(TESTS_PATH, os.pardir))
7+
8+
# Adds project dir to python path so source code can be imported
9+
sys.path.append(PROJECT_PATH)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setUp(self):
2222
os.makedirs(current_scenario_path)
2323

2424
shutil.copy(
25-
TESTS_PATH + '/subrepos.' + test_item,
25+
TESTS_PATH + '/../helperfiles/subrepos.' + test_item,
2626
os.path.join(current_scenario_path, 'subrepos')
2727
)
2828

0 commit comments

Comments
 (0)