Skip to content

Commit ce1e7ae

Browse files
committed
Add pytest back in
Add pytest test
1 parent 3248f1f commit ce1e7ae

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Dockerfile.tmpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ RUN pip install mpld3 \
320320
python-louvain \
321321
pyexcel-ods \
322322
sklearn-pandas \
323-
stemming \
323+
stemming \
324324
# b/266272046 prophet 1.1.2 breaks the test
325325
prophet==1.1.1 \
326326
# b/283847935 holidays 0.25 is broken
@@ -342,7 +342,8 @@ RUN pip install mpld3 \
342342
geoplot \
343343
eli5 \
344344
kaggle \
345-
mock && \
345+
mock \
346+
pytest && \
346347
/tmp/clean-layer.sh
347348

348349
RUN rm -rf /opt/conda/lib/python3.10/site-packages/numpy-1.23.5.dist-info*
@@ -361,9 +362,6 @@ RUN pip install tensorpack && \
361362
memory_profiler && \
362363
/tmp/clean-layer.sh
363364

364-
365-
366-
367365
# install cython & cysignals before pyfasttext
368366
RUN pip install cython \
369367
cysignals \

tests/test_pytest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import subprocess
3+
import unittest
4+
5+
6+
class test_pytest(unittest.TestCase):
7+
def test_pytest_on_pandas_test(self):
8+
cmd = 'pytest /input/tests/test_pandas.py'
9+
result = subprocess.run(cmd, shell=True, capture_output=True)
10+
self.assertEqual(result.returncode, 0)

0 commit comments

Comments
 (0)