Skip to content

Commit 09b8c1d

Browse files
committed
adjust PATH in tests to work on macOS and windows without conda
1 parent 71f0ce9 commit 09b8c1d

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

test/congruence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def check_value(dfrow, colname, shouldbe):
1919

2020
_, repo_path, bindirs = get_srcrepobindirs()
2121

22-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
22+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
2323

2424
sys.path.append(os.path.join(repo_path, "src", "gui"))
2525
import model as M

test/freeze-classify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
_, repo_path, bindirs = get_srcrepobindirs()
2020

21-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
21+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
2222

2323
sys.path.append(os.path.join(repo_path, "src", "gui"))
2424
import model as M

test/seeds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
_, repo_path, bindirs = get_srcrepobindirs()
1717

18-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
18+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
1919

2020
sys.path.append(os.path.join(repo_path, "src", "gui"))
2121
import model as M

test/shiftby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
srcdir, repo_path, bindirs = get_srcrepobindirs()
1515

16-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
16+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
1717

1818
os.makedirs(os.path.join(repo_path, "test", "scratch", "shiftby"))
1919
shutil.copy(os.path.join(repo_path, "configuration.py"),

test/tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
_, repo_path, bindirs = get_srcrepobindirs()
1616

17-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
17+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
1818

1919
sys.path.append(os.path.join(repo_path, "src", "gui"))
2020
import model as M

test/tutorial.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repo_path=$(dirname $testdir)
2727
bindir=$(dirname $repo_path)
2828
srcdir=${repo_path}/src
2929

30-
PATH=$PATH:$bindir
30+
PATH=$bindir:$PATH
3131

3232
mkdir -p $repo_path/test/scratch/tutorial-sh
3333
cp $repo_path/configuration.py $repo_path/test/scratch/tutorial-sh

test/visualization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
_, repo_path, bindirs = get_srcrepobindirs()
1818

19-
os.environ['PATH'] = os.pathsep.join([*os.environ['PATH'].split(os.pathsep), *bindirs])
19+
os.environ['PATH'] = os.pathsep.join([*bindirs, *os.environ['PATH'].split(os.pathsep)])
2020

2121
sys.path.append(os.path.join(repo_path, "src", "gui"))
2222
import model as M

0 commit comments

Comments
 (0)