Skip to content

Commit

Permalink
Fix unittest issue (#470)
Browse files Browse the repository at this point in the history
* new file

* eof

* conda-recipe

* space
  • Loading branch information
OnlyDeniko authored Jan 25, 2021
1 parent 809f0ab commit d2bf5f2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
source activate CB
python -c "import daal4py"
mpirun -n 4 python -m unittest discover -v -s tests -p spmd*.py
python -m unittest discover -v -s tests -p test*.py
python tests/run_tests.py
displayName: Testing
- script: |
source activate CB
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test:
- python -c "import daal4py"
- mpirun -n 4 python -m unittest discover -v -s tests -p spmd*.py # [not win]
- mpiexec -localonly -n 4 python -m unittest discover -v -s tests -p spmd*.py # [win]
- python -m unittest discover -v -s tests -p test*.py
- python tests/run_tests.py
- pytest --pyargs daal4py/sklearn/
- python examples/run_examples.py
- python -m daal4py examples/sycl/sklearn_sycl.py
Expand Down
24 changes: 24 additions & 0 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#===============================================================================
# Copyright 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

import sys
import unittest

if __name__ == '__main__':
test_suite = unittest.defaultTestLoader.discover('tests', 'test*.py')
test_runner = unittest.TextTestRunner()
result = test_runner.run(test_suite)
sys.exit(not result.wasSuccessful())

0 comments on commit d2bf5f2

Please sign in to comment.