Skip to content

Commit 0fd7e2f

Browse files
committedNov 20, 2020
rename tests for pytest discovery
1 parent 64be69a commit 0fd7e2f

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed
 

Diff for: ‎k8/images/hvplot/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ RUN --mount=type=cache,target=/root/.cache/pip \
1616

1717
RUN python -c "import hvplot"
1818

19+
COPY rename_tests.py .
20+
RUN python rename_tests.py
21+
1922
ENV PYTHON_RECORD_API_FROM_MODULES=hvplot
20-
CMD [ "pytest", "hvplot/tests/*", "--verbose", "--suppress-tests-failed-exit-code"]
23+
CMD ["pytest", "--verbose", "hvplot/tests/", "--suppress-tests-failed-exit-code"]

Diff for: ‎k8/images/hvplot/rename_tests.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import glob
2+
import shutil
3+
import os.path as osp
4+
all_tests = glob.glob('hvplot/tests/test*')
5+
for test_file in all_tests:
6+
print(test_file)
7+
print(test_file.split('test'))
8+
*_, rest = test_file.split('test')
9+
new_path = osp.join('hvplot/tests', f'test_{rest}')
10+
print(rest)
11+
shutil.move(test_file, new_path)

Diff for: ‎k8/images/hvplot/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

0 commit comments

Comments
 (0)
Please sign in to comment.