Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: also look for examples in [.../dist-packages]/migen/examples/.
Browse files Browse the repository at this point in the history
whitequark committed Dec 1, 2015
1 parent 2bf1110 commit 202e23b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion migen/test/test_examples.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,11 @@ def _make_test_method(name, foldername):
def test_method(self):
filename = name + ".py"
example_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "..", "examples"))
os.path.join(os.path.dirname(__file__), "..", "examples"))
if not os.path.isfile(example_path):
# we're running from the source tree
example_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "..", "examples"))
filepath = os.path.join(example_path, foldername, filename)
subprocess.check_call(
[sys.executable, filepath],

0 comments on commit 202e23b

Please sign in to comment.