File tree Expand file tree Collapse file tree 9 files changed +73
-32
lines changed
src/yafowil/widget/tiptap Expand file tree Collapse file tree 9 files changed +73
-32
lines changed Original file line number Diff line number Diff line change 1
1
* .egg-info
2
2
* .pyc
3
3
* .pyo
4
- * #*
5
- * ~
6
4
/.coverage
7
- /bin /
8
- /coverage /
9
5
/dist /
10
- /include /
6
+ /htmlcov /
11
7
/js /karma /
12
- /lib /
13
- /lib64
14
- /local /
15
8
/node_modules /
16
9
/package-lock.json
17
- /pyvenv.cfg
18
- /share /
10
+ /py2 /
11
+ /py3 /
12
+ /pypy3 /
Original file line number Diff line number Diff line change 15
15
"karma-typescript" : " ^5.5.3" ,
16
16
"karma-viewport" : " ^1.0.9" ,
17
17
"qunit" : " ^2.19.1" ,
18
- "rollup" : " ^2.74.1 " ,
18
+ "rollup" : " ^2.75.3 " ,
19
19
"rollup-plugin-cleanup" : " ^3.2.1" ,
20
20
"rollup-plugin-export-default" : " ^1.4.0" ,
21
21
"rollup-plugin-terser" : " ^7.0.2" ,
Original file line number Diff line number Diff line change 5
5
set -e
6
6
7
7
to_remove=(
8
- .coverage bin dist include htmlcov js/karma lib64 lib
9
- node_modules package-lock.json pyvenv.cfg share
8
+ .coverage
9
+ dist
10
+ htmlcov
11
+ js/karma
12
+ node_modules
13
+ package-lock.json
14
+ py2
15
+ py3
16
+ pypy3
10
17
)
11
18
12
19
for item in " ${to_remove[@]} " ; do
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
3
3
set -e
4
4
5
- ./bin/coverage run \
6
- --source src/yafowil/widget/tiptap \
7
- --omit src/yafowil/widget/tiptap/example.py \
8
- -m yafowil.widget.tiptap.tests
9
- ./bin/coverage report
10
- ./bin/coverage html
5
+ function run_coverage {
6
+ local target=$1
7
+
8
+ if [ -e " $target " ]; then
9
+ ./$target /bin/coverage run \
10
+ --source src/yafowil/widget/tiptap \
11
+ --omit src/yafowil/widget/tiptap/example.py \
12
+ -m yafowil.widget.tiptap.tests
13
+ ./$target /bin/coverage report
14
+ ./$target /bin/coverage html
15
+ else
16
+ echo " Target $target not found."
17
+ fi
18
+ }
19
+
20
+ run_coverage py2
21
+ run_coverage py3
22
+ run_coverage pypy3
Original file line number Diff line number Diff line change @@ -49,9 +49,21 @@ npm --prefix . --save install \
49
49
50
50
npm --prefix . --no-save install https://github.com/jquery/jquery#main
51
51
52
+ function install {
53
+ local interpreter=$1
54
+ local target=$2
52
55
53
- python3 -m venv .
54
- ./bin/pip install wheel
55
- ./bin/pip install coverage
56
- ./bin/pip install yafowil[test]
57
- ./bin/pip install -e .[test]
56
+ if [ -x " $( which $interpreter ) " ]; then
57
+ virtualenv --clear -p $interpreter $target
58
+ ./$target /bin/pip install wheel coverage
59
+ ./$target /bin/pip install https://github.com/conestack/webresource/archive/master.zip
60
+ ./$target /bin/pip install https://github.com/conestack/yafowil/archive/master.zip
61
+ ./$target /bin/pip install -e .[test]
62
+ else
63
+ echo " Interpreter $interpreter not found. Skip install."
64
+ fi
65
+ }
66
+
67
+ install python2 py2
68
+ install python3 py3
69
+ install pypy3 pypy3
Original file line number Diff line number Diff line change 2
2
#
3
3
# Run python tests.
4
4
5
- ./bin/python -m yafowil.widget.tiptap.tests
5
+ function run_tests {
6
+ local target=$1
7
+
8
+ if [ -e " $target " ]; then
9
+ ./$target /bin/python -m yafowil.widget.tiptap.tests
10
+ else
11
+ echo " Target $target not found."
12
+ fi
13
+ }
14
+
15
+ run_tests py2
16
+ run_tests py3
17
+ run_tests pypy3
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ def read_file(name):
15
15
'CHANGES.rst' ,
16
16
'LICENSE.rst'
17
17
]])
18
- tests_require = ['yafowil[test]' ]
19
18
20
19
21
20
setup (
@@ -48,10 +47,14 @@ def read_file(name):
48
47
'setuptools' ,
49
48
'yafowil>2.2' ,
50
49
],
51
- tests_require = tests_require ,
52
- extras_require = dict (
53
- test = tests_require ,
54
- ),
50
+ tests_require = [
51
+ 'lxml' ,
52
+ 'zope.testrunner'
53
+ ],
54
+ extras_require = dict (test = [
55
+ 'lxml' ,
56
+ 'zope.testrunner'
57
+ ]),
55
58
test_suite = "yafowil.widget.tiptap.tests" ,
56
59
entry_points = """
57
60
[yafowil.plugin]
Original file line number Diff line number Diff line change 14
14
# webresource ################################################################
15
15
16
16
resources = wr .ResourceGroup (
17
- name = 'yafowil- tiptap-resources ' ,
17
+ name = 'yafowil.widget. tiptap' ,
18
18
directory = resources_dir ,
19
19
path = 'yafowil-tiptap'
20
20
)
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ def test_resources(self):
143
143
factory .theme = 'default'
144
144
resources = factory .get_resources ('yafowil.widget.tiptap' )
145
145
self .assertTrue (resources .directory .endswith (np ('/tiptap/resources' )))
146
+ self .assertEqual (resources .name , 'yafowil.widget.tiptap' )
146
147
self .assertEqual (resources .path , 'yafowil-tiptap' )
147
148
148
149
scripts = resources .scripts
You can’t perform that action at this time.
0 commit comments