File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed
Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ def get_extra_compile_args():
554554]
555555
556556def read_version ():
557- init_path = Path (__file__ ).parent / "yourpackage " / "__init__.py"
557+ init_path = Path (__file__ ).parent / "svv " / "__init__.py"
558558 src = init_path .read_text (encoding = "utf-8" )
559559 match = re .search (r'^__version__\s*=\s*[\'"]([^\'"]+)[\'"]' , src , re .M )
560560 if match :
Original file line number Diff line number Diff line change 1+ """
2+ This file launches the testing suite for the svVascularize (svv)
3+ package. You can run the test suite with the following command:
4+
5+ `python -m svv.tests [pytest args]
6+
7+ The real test files are in the top-level ``tests/`` folder of the
8+ source code and not packaged within the distibution wheels. If you
9+ would like to run the tests, you will require the full repo.
10+ """
11+ from __future__ import annotations
12+ import pathlib
13+ import sys
14+ import pytest
15+
16+ def main () -> None :
17+ # Locate the source package root wherever it is installed.
18+ root = pathlib .Path (__file__ ).resolve ().parents [2 ]
19+ tests_dir = root / "tests"
20+
21+ if not tests_dir .is_dir ():
22+ # This installation does not contain the tests suite
23+ # (probably because this is a wheel installation)
24+ print (
25+ " The full test-suite isn’t packaged in the installed wheel.\n "
26+ " Clone the repository if you want to run it:\n "
27+ " git clone https://github.com/SimVascular/svVascularize.git && cd svv && "
28+ "python -m svv.tests"
29+ )
30+ sys .exit (1 )
31+
32+ sys .exit (pytest .main ([str (tests_dir ), * sys .argv [1 :]]))
33+
34+ if __name__ == "__main__" :
35+ main ()
You can’t perform that action at this time.
0 commit comments