File tree 5 files changed +37
-19
lines changed
5 files changed +37
-19
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ jobs:
171
171
cd ${{ github.workspace }}/opencv
172
172
python modules/python/test/test.py -v --repo .
173
173
174
+ - name : Pylint test
175
+ run : |
176
+ python -m pip install pylint
177
+ python -m pylint ${{ github.workspace }}/tests/pylint.py --extension-pkg-whitelist=cv2 --disable=missing-docstring
178
+
174
179
test_release_opencv_python :
175
180
if : github.event_name == 'release' && github.event.release.prerelease
176
181
needs : [build, test]
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ jobs:
106
106
cd ${{ github.workspace }}/opencv
107
107
arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
108
108
109
+ - name : Pylint test
110
+ run : |
111
+ arch -arm64 python${{ matrix.python-version }} -m pip install pylint
112
+ arch -arm64 python${{ matrix.python-version }} -m pylint ${{ github.workspace }}/tests/pylint.py --extension-pkg-whitelist=cv2 --disable=missing-docstring
113
+
109
114
test_release_opencv_python :
110
115
if : github.event_name == 'release' && github.event.release.prerelease
111
116
needs : [build, test]
Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ jobs:
130
130
python modules\python\test\test.py -v --repo .
131
131
shell : cmd
132
132
133
+ - name : Pylint test
134
+ run : |
135
+ python -m pip install pylint
136
+ python -m pylint ${{ github.workspace }}\tests\pylint.py --extension-pkg-whitelist=cv2 --disable=missing-docstring
137
+ shell : cmd
138
+
133
139
test_release_opencv_python :
134
140
if : github.event_name == 'release' && github.event.release.prerelease
135
141
needs : [build-windows-x86_64, test]
Original file line number Diff line number Diff line change
1
+ from cv2 import getStructuringElement , MORPH_ELLIPSE
2
+
3
+ a = getStructuringElement (MORPH_ELLIPSE , (3 , 3 ))
Original file line number Diff line number Diff line change @@ -141,37 +141,36 @@ function run_tests {
141
141
142
142
PYTHON=python$PYTHON_VERSION
143
143
144
- if [ -n " $IS_OSX " ]; then
145
- echo " Running for OS X"
146
-
147
- cd ../tests
148
- $PYTHON get_build_info.py
149
-
150
- cd ../opencv/
151
- export OPENCV_TEST_DATA_PATH=../opencv_extra/testdata
152
- else
153
- echo " Running for linux"
154
-
155
- if [ $PYTHON == " python3.6" ]; then
156
- $PYTHON -m pip install -U numpy==1.19.4
157
- fi
158
- cd /io/tests
159
- $PYTHON get_build_info.py
144
+ echo " Running for linux"
160
145
161
- cd /io/opencv
162
- export OPENCV_TEST_DATA_PATH=/io/opencv_extra/testdata
146
+ if [ $PYTHON == " python3.6 " ] ; then
147
+ $PYTHON -m pip install -U numpy==1.19.4
163
148
fi
149
+ cd /io/tests
150
+ $PYTHON get_build_info.py
151
+
152
+ cd /io/opencv
153
+ export OPENCV_TEST_DATA_PATH=/io/opencv_extra/testdata
164
154
165
155
test_wheels
156
+ pylint_test
166
157
}
167
158
168
159
function test_wheels {
169
160
170
- echo " Starting tests..."
161
+ echo " Starting OpenCV tests..."
171
162
172
163
# Test package
173
164
$PYTHON modules/python/test/test.py -v --repo .
174
165
}
175
166
167
+ function pylint_test {
168
+
169
+ echo " Starting Pylint tests..."
170
+
171
+ $PYTHON -m pip install pylint
172
+ $PYTHON -m pylint /io/tests/pylint.py --extension-pkg-whitelist=cv2 --disable=missing-docstring
173
+ }
174
+
176
175
export PS4=' +(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
177
176
set -x
You can’t perform that action at this time.
0 commit comments