Skip to content

Commit 0828eb7

Browse files
committed
changed base dir for pytests
1 parent 33a9537 commit 0828eb7

7 files changed

+21
-9
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
working-directory: ${{ env.FANS_BUILD_DIR }}
7373
run: |
7474
su -c "ctest" ${{ env.FANS_MPI_USER }}
75-
find . -name "*.h5" -exec chmod 644 {} \;
76-
echo "Available H5 files for pytest:"
77-
find . -name "*.h5" -type f | sort
75+
find . -name "*.h5" -exec chmod 644 {} \;
76+
echo "Available H5 files for pytest:"
77+
find "$(pwd)" -name "*.h5" -type f | sort
7878
7979
- uses: actions/upload-artifact@v4
8080
if: failure()

test/unit/test_displacement_averaging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
]
2424
)
2525
def test_files(request):
26-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
26+
base_dir = os.path.join(
27+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
28+
)
2729

2830
json_path = os.path.join(base_dir, request.param[0])
2931
h5_path = os.path.join(base_dir, request.param[1])

test/unit/test_homogenization_consistency.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
]
2424
)
2525
def test_files(request):
26-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
26+
base_dir = os.path.join(
27+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
28+
)
2729

2830
json_path = os.path.join(base_dir, request.param[0])
2931
h5_path = os.path.join(base_dir, request.param[1])

test/unit/test_homogenized_tangent_spd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
]
2525
)
2626
def test_files(request):
27-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
27+
base_dir = os.path.join(
28+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
29+
)
2830

2931
json_path = os.path.join(base_dir, request.param[0])
3032
h5_path = os.path.join(base_dir, request.param[1])

test/unit/test_homogenized_tangent_within_VRbounds.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
]
3030
)
3131
def test_files(request):
32-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
32+
base_dir = os.path.join(
33+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
34+
)
3335

3436
json_path = os.path.join(base_dir, request.param[0])
3537
h5_path = os.path.join(base_dir, request.param[1])

test/unit/test_loading_to_strain_average.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
]
2424
)
2525
def test_files(request):
26-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
26+
base_dir = os.path.join(
27+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
28+
)
2729

2830
json_path = os.path.join(base_dir, request.param[0])
2931
h5_path = os.path.join(base_dir, request.param[1])

test/unit/test_strain_stress_averaging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
]
2424
)
2525
def test_files(request):
26-
base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
26+
base_dir = os.path.join(
27+
os.path.dirname(os.path.abspath(__file__)), "../../build/test/"
28+
)
2729

2830
json_path = os.path.join(base_dir, request.param[0])
2931
h5_path = os.path.join(base_dir, request.param[1])

0 commit comments

Comments
 (0)