Skip to content

Commit a76bce6

Browse files
committed
maint: refactor test, eliminate duplicated test
1 parent 10fcecd commit a76bce6

File tree

8 files changed

+232
-271
lines changed

8 files changed

+232
-271
lines changed

.circleci/config.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,27 @@ jobs:
108108
pkg-manager: pip
109109
cache-version: v1
110110

111+
- run:
112+
name: Run tests (config and others)
113+
command: |
114+
python -m pytest \
115+
--junit-xml=~/tests/conftests.xml --cov templateflow --cov-report xml:~/coverage/cov_config.xml \
116+
templateflow/tests/
117+
118+
- codecov/upload:
119+
file: ~/coverage/cov_config.xml
120+
flags: config
121+
cli_args: "-e CIRCLE_JOB"
122+
upload_name: General
123+
111124
- run:
112125
name: Run tests (w/ DataLad)
113126
command: |
114127
mkdir -p ~/tests/ ~/coverage/
115128
export TEMPLATEFLOW_USE_DATALAD=on
116129
python -m pytest \
117130
--junit-xml=~/tests/datalad.xml --cov templateflow --cov-report xml:~/coverage/cov_api_dl.xml \
118-
--doctest-modules templateflow/
131+
--doctest-modules templateflow/api.py
119132
120133
- codecov/upload:
121134
file: ~/coverage/cov_api_dl.xml
@@ -154,19 +167,6 @@ jobs:
154167
cli_args: "-e CIRCLE_JOB"
155168
upload_name: Datalad-S3-bypass
156169

157-
- run:
158-
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
159-
command: |
160-
python -m pytest \
161-
--junit-xml=~/tests/conftests.xml --cov templateflow --cov-report xml:~/coverage/cov_config.xml \
162-
templateflow/conf/tests/test_conf.py
163-
164-
- codecov/upload:
165-
file: ~/coverage/cov_config.xml
166-
flags: config
167-
cli_args: "-e CIRCLE_JOB"
168-
upload_name: Config
169-
170170
- store_test_results:
171171
path: ~/tests
172172

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ per-file-ignores = [
115115

116116
[tool.pytest.ini_options]
117117
norecursedirs = [".git"]
118-
addopts = "-svx --doctest-modules"
118+
addopts = "-svx"
119119
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE ELLIPSIS"
120120
env = "PYTHONHASHSEED=0"
121121
filterwarnings = ["ignore::DeprecationWarning"]

templateflow/conf/tests/__init__.py

Whitespace-only changes.

templateflow/conf/tests/test_conf.py

Lines changed: 0 additions & 156 deletions
This file was deleted.

templateflow/conf/tests/test_s3.py

Lines changed: 0 additions & 74 deletions
This file was deleted.

templateflow/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import pytest
2626

27-
from .. import api
27+
from templateflow import api
2828

2929

3030
class Bibtex:

0 commit comments

Comments
 (0)