File tree 3 files changed +14
-27
lines changed 3 files changed +14
-27
lines changed Original file line number Diff line number Diff line change 47
47
# |version| and |release|, also used in various other places throughout the
48
48
# built documents.
49
49
#
50
- import pytestqt
50
+ import re
51
+ with open ('../pytestqt/__init__.py' ) as f :
52
+ m = re .search ("version = '(.*)'" , f .read ())
53
+ assert m is not None
54
+ version = m .group (1 )
51
55
# The short X.Y version.
52
- version = pytestqt .version
53
56
# The full version, including alpha/beta/rc tags.
54
- release = pytestqt . version
57
+ release = version
55
58
56
59
# The language for content autogenerated by Sphinx. Refer to documentation
57
60
# for a list of supported languages.
Original file line number Diff line number Diff line change @@ -26,4 +26,5 @@ def test_hello(qtbot):
26
26
27
27
'''
28
28
29
- version = __version__ = '1.4.0'
29
+ version = '1.4.0'
30
+ __version__ = version
Original file line number Diff line number Diff line change 1
- import sys
1
+ import re
2
2
3
3
from setuptools import setup
4
- from setuptools .command .test import test as TestCommand
5
4
6
- import pytestqt
7
5
8
-
9
- class PyTest (TestCommand ):
10
- """
11
- Overrides setup "test" command, taken from here:
12
- http://pytest.org/latest/goodpractises.html
13
- """
14
-
15
- def finalize_options (self ):
16
- TestCommand .finalize_options (self )
17
- self .test_args = []
18
- self .test_suite = True
19
-
20
- def run_tests (self ):
21
- # import here, cause outside the eggs aren't loaded
22
- import pytest
23
-
24
- errno = pytest .main ([])
25
- sys .exit (errno )
6
+ with open ('pytestqt/__init__.py' ) as f :
7
+ m = re .search ("version = '(.*)'" , f .read ())
8
+ assert m is not None
9
+ version = m .group (1 )
26
10
27
11
28
12
setup (
29
13
name = "pytest-qt" ,
30
- version = pytestqt . version ,
14
+ version = version ,
31
15
packages = ['pytestqt' ],
32
16
entry_points = {
33
17
'pytest11' : ['pytest-qt = pytestqt.plugin' ],
@@ -56,5 +40,4 @@ def run_tests(self):
56
40
'Topic :: Software Development :: User Interfaces' ,
57
41
],
58
42
tests_requires = ['pytest' ],
59
- cmdclass = {'test' : PyTest },
60
43
)
You can’t perform that action at this time.
0 commit comments