Browse Source

Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ieca57f7c2e6b2ff5c95f8643985ad760c71e0fc3
Vu Cong Tuan 9 months ago
parent
commit
eaa81ffdfc
6 changed files with 15 additions and 10 deletions
  1. 1
    2
      .gitignore
  2. 4
    0
      .stestr.conf
  3. 0
    4
      .testr.conf
  4. 1
    1
      lower-constraints.txt
  5. 1
    1
      test-requirements.txt
  6. 8
    2
      tox.ini

+ 1
- 2
.gitignore View File

@@ -13,7 +13,6 @@ coverage.xml
13 13
 cover/*
14 14
 covhtml
15 15
 pep8.txt
16
-nosetests.xml
17 16
 doc/build
18 17
 .DS_Store
19 18
 doc/source/api
@@ -24,5 +23,5 @@ build/
24 23
 dist/
25 24
 .project
26 25
 .pydevproject
27
-.testrepository/
26
+.stestr/
28 27
 *.db

+ 4
- 0
.stestr.conf View File

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

+ 0
- 4
.testr.conf View File

@@ -1,4 +0,0 @@
1
-[DEFAULT]
2
-test_command=${PYTHON:-python} -m subunit.run discover -t ./  ${OS_TEST_PATH:-./ldappool/tests} $LISTOPT $IDOPTION
3
-test_id_option=--load-list $IDFILE
4
-test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@@ -28,7 +28,7 @@ six==1.10.0
28 28
 snowballstemmer==1.2.1
29 29
 Sphinx==1.6.2
30 30
 sphinxcontrib-websupport==1.0.1
31
-testrepository==0.0.18
31
+stestr==2.0.0
32 32
 testresources==2.0.0
33 33
 testtools==2.2.0
34 34
 traceback2==1.4.0

+ 1
- 1
test-requirements.txt View File

@@ -10,6 +10,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
10 10
 fixtures>=3.0.0 # Apache-2.0/BSD
11 11
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
12 12
 openstackdocstheme>=1.18.1 # Apache-2.0
13
-testrepository>=0.0.18 # Apache-2.0/BSD
13
+stestr>=2.0.0 # Apache-2.0
14 14
 testresources>=2.0.0 # Apache-2.0/BSD
15 15
 testtools>=2.2.0 # MIT

+ 8
- 2
tox.ini View File

@@ -15,7 +15,7 @@ deps =
15 15
        -r{toxinidir}/requirements.txt
16 16
        -r{toxinidir}/test-requirements.txt
17 17
 commands = find . -type f -name "*.pyc" -delete
18
-           python setup.py testr --slowest --testr-args='{posargs}'
18
+           stestr run --slowest {posargs}
19 19
 whitelist_externals = find
20 20
 
21 21
 [testenv:pep8]
@@ -26,7 +26,13 @@ commands =
26 26
 commands = {posargs}
27 27
 
28 28
 [testenv:cover]
29
-commands = python setup.py testr --coverage --testr-args='{posargs}'
29
+setenv =
30
+    PYTHON=coverage run --source ldappool --parallel-mode
31
+commands =
32
+    stestr run '{posargs}'
33
+    coverage combine
34
+    coverage html -d cover
35
+    coverage xml -o cover/coverage.xml
30 36
 
31 37
 [flake8]
32 38
 # D100: Missing docstring in public module

Loading…
Cancel
Save