Skip to content

Commit

Permalink
add source in path in the tests, not in the github workflows
Browse files Browse the repository at this point in the history
bryan-brancotte committed Dec 12, 2023
1 parent 8c1b576 commit b2a7330
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -34,6 +34,5 @@ jobs:
- name: Run the tests
run: |
macsydata list
export PYTHONPATH="$(pwd)"
coverage run --source . tests/run_tests.py
coverage report -m
14 changes: 7 additions & 7 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
@@ -89,18 +89,18 @@ def main(args=None):

args = parser.parse_args(args)

# MACSY_HOME = os.path.abspath(os.path.join(__file__, '..', '..'))
MACSY_HOME = os.path.abspath(os.path.join(__file__, '..', '..'))

# old_path = sys.path
old_path = sys.path

# if MACSY_HOME not in sys.path:
# # need to add tests in path
# # tests inherits from IntegronTest which is located in tests/__init__.py
# sys.path.insert(0, MACSY_HOME)
if MACSY_HOME not in sys.path:
# need to add tests in path
# tests inherits from IntegronTest which is located in tests/__init__.py
sys.path.insert(0, MACSY_HOME)

test_runner = run_tests(args.tests, verbosity=args.verbosity)
unit_results = test_runner.wasSuccessful()
# sys.path = old_path
sys.path = old_path
return unit_results


0 comments on commit b2a7330

Please sign in to comment.