Skip to content

Commit

Permalink
wip #54 changing to example directory inside pytest test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkamm committed Feb 10, 2024
1 parent d968977 commit 540ea3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from pathlib import Path
import runpy

Expand All @@ -9,6 +10,7 @@ def test_examples():


def test_suzuki_example():
# CHANGE DIRECTORY INTO THE SUZUKI EXAMPLE BEFORE EXECUTING THE SCRIPT
example_vars = runpy.run_path(Path(__file__).parents[1] / 'examples' / 'suzuki' / 'suzuki.py')
example_path = Path(__file__).parents[1] / 'examples' / 'suzuki'
os.chdir(example_path)
example_vars = runpy.run_path(example_path / 'suzuki.py')

0 comments on commit 540ea3d

Please sign in to comment.