Skip to content

Commit d33ac3e

Browse files
committed
update unit test cases
1 parent b33ffca commit d33ac3e

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ script:
4242
- cd python
4343
- python setup.py install
4444
- cd ideep4py/tests
45-
- CHAINER_TEST_GPU_LIMIT=0 pytest -m "not slow and not cudnn" ideep4py_tests
45+
- ENALE_TRAVIS_TEST=1 pytest -s -v .
4646

4747

4848
addons:

python/ideep4py/tests/ideep4py_tests/test_convolution2d_py.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23
import unittest
34
import numpy
@@ -24,11 +25,18 @@ def _set_cover_all(self, x, W):
2425
self.pw, d=self.dx))
2526

2627

28+
if bool(int(os.environ.get('ENALE_TRAVIS_TEST', '0'))):
29+
bs_list = [1, 2, 4, 5, 8, 10, 16, 32, 64, ]
30+
else:
31+
bs_list = [1, 2, 4, 5, 8, 10, 16, 32, 64, 96, 128, 192, 256, 512, ]
32+
print('bs_list: ', bs_list)
33+
34+
2735
@testing.parameterize(*testing.product({
2836
'dtype': [numpy.float32, ],
2937
'cover_all': [False, True],
3038
'channel': [1, 2, 4, 8, 10, ],
31-
'bs': [1, 2, 4, 5, 8, 10, 16, 32, 64, 96, 128, 192, 256, 512, ],
39+
'bs': bs_list,
3240
'with_bias': [True, ],
3341
}))
3442
@testing.fix_random()

python/ideep4py/tests/ideep4py_tests/test_pooling_2d_py.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23
import unittest
34

@@ -16,11 +17,17 @@
1617
print('*** testing directory is missing: %s' % ex)
1718
sys.exit(-1)
1819

20+
if bool(int(os.environ.get('ENALE_TRAVIS_TEST', '0'))):
21+
bs_list = [0, 1, 2, 4, 5, 6, 8, 10, 16, 24, 32, 64, ]
22+
else:
23+
bs_list = [0, 1, 2, 4, 5, 6, 8, 10, 16, 24, 32, 64, 96, 128, 196, 256, ]
24+
print('bs_list: ', bs_list)
25+
1926

2027
@testing.parameterize(*testing.product({
2128
'dtype': [numpy.float32],
2229
'channel': [1, 2, 4, 8, 10, 16, 24, 32, 64, ],
23-
'bs': [0, 1, 2, 4, 5, 6, 8, 10, 16, 24, 32, 64, 96, 128, 196, 256, ],
30+
'bs': bs_list,
2431
'stride': [2, ],
2532
}))
2633
class TestPooling2DPyF32(unittest.TestCase):

0 commit comments

Comments
 (0)