Browse Source

switch to stestr; fix tox.ini

Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 1 year ago
parent
commit
ba465598ef
6 changed files with 28 additions and 10 deletions
  1. 5
    0
      .gitignore
  2. 3
    0
      .stestr.conf
  3. 1
    3
      git_nit/cmd.py
  4. 0
    0
      git_nit/tests/__init__.py
  5. 3
    1
      test-requirements.txt
  6. 16
    6
      tox.ini

+ 5
- 0
.gitignore View File

@@ -0,0 +1,5 @@
1
+/.stestr
2
+/.tox
3
+/AUTHORS
4
+/ChangeLog
5
+/*.egg-info

+ 3
- 0
.stestr.conf View File

@@ -0,0 +1,3 @@
1
+[DEFAULT]
2
+test_path=./git_nit/tests
3
+top_dir=./

+ 1
- 3
git_nit/cmd.py View File

@@ -8,9 +8,7 @@
8 8
 #
9 9
 # Unless required by applicable law or agreed to in writing, software
10 10
 # distributed under the License is distributed on an "AS IS" BASIS,
11
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
-# implied.
13
-#
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 12
 # See the License for the specific language governing permissions and
15 13
 # limitations under the License.
16 14
 

+ 0
- 0
git_nit/tests/__init__.py View File


+ 3
- 1
test-requirements.txt View File

@@ -1,6 +1,8 @@
1 1
 hacking>=0.10.0,<0.11
2 2
 mock
3 3
 fixtures>=0.3.14
4
-testrepository>=0.0.18
5 4
 testtools>=0.9.34
6 5
 sphinx>=1.1.2,!=1.2.0
6
+coverage
7
+python-subunit>=1.0.0 # Apache-2.0/BSD
8
+stestr>=1.0.0 # Apache-2.0

+ 16
- 6
tox.ini View File

@@ -1,5 +1,5 @@
1 1
 [tox]
2
-envlist = py27,py35,pep8
2
+envlist = py35,py27,pep8
3 3
 
4 4
 [testenv]
5 5
 basepython = python3
@@ -7,9 +7,11 @@ install_command = pip install -U {opts} {packages}
7 7
 setenv =
8 8
     VIRTUAL_ENV={envdir}
9 9
 
10
-commands =
11
-  python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}'
12
-  coverage report --show-missing
10
+commands = stestr run {posargs}
11
+           stestr slowest
12
+# commands =
13
+#   python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}'
14
+#   coverage report --show-missing
13 15
 
14 16
 deps =
15 17
     -r{toxinidir}/requirements.txt
@@ -20,9 +22,17 @@ basepython = python2.7
20 22
 
21 23
 [testenv:pep8]
22 24
 commands = flake8
25
+skip_install = True
23 26
 
24
-[testenv:sdist]
25
-commands = python setup.py sdist {posargs}
27
+[testenv:cover]
28
+setenv =
29
+    {[testenv]setenv}
30
+    PYTHON=coverage run --source shade --parallel-mode
31
+commands =
32
+    stestr run {posargs}
33
+    coverage combine
34
+    coverage html -d cover
35
+    coverage xml -o cover/coverage.xml
26 36
 
27 37
 [testenv:docs]
28 38
 commands = python setup.py build_sphinx

Loading…
Cancel
Save