Skip to content

Commit

Permalink
maint: refactor test, eliminate duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Sep 13, 2024
1 parent 10fcecd commit dad314f
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 270 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,27 @@ jobs:
pkg-manager: pip
cache-version: v1

- run:
name: Run tests (config and others)
command: |
python -m pytest \
--junit-xml=~/tests/conftests.xml --cov templateflow --cov-report xml:~/coverage/cov_config.xml \
templateflow/tests/
- codecov/upload:
file: ~/coverage/cov_config.xml
flags: config
cli_args: "-e CIRCLE_JOB"
upload_name: General

- run:
name: Run tests (w/ DataLad)
command: |
mkdir -p ~/tests/ ~/coverage/
export TEMPLATEFLOW_USE_DATALAD=on
python -m pytest \
--junit-xml=~/tests/datalad.xml --cov templateflow --cov-report xml:~/coverage/cov_api_dl.xml \
--doctest-modules templateflow/
--doctest-modules templateflow/api.py
- codecov/upload:
file: ~/coverage/cov_api_dl.xml
Expand Down Expand Up @@ -154,19 +167,6 @@ jobs:
cli_args: "-e CIRCLE_JOB"
upload_name: Datalad-S3-bypass

- run:
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
command: |
python -m pytest \
--junit-xml=~/tests/conftests.xml --cov templateflow --cov-report xml:~/coverage/cov_config.xml \
templateflow/conf/tests/test_conf.py
- codecov/upload:
file: ~/coverage/cov_config.xml
flags: config
cli_args: "-e CIRCLE_JOB"
upload_name: Config

- store_test_results:
path: ~/tests

Expand Down
Empty file.
156 changes: 0 additions & 156 deletions templateflow/conf/tests/test_conf.py

This file was deleted.

74 changes: 0 additions & 74 deletions templateflow/conf/tests/test_s3.py

This file was deleted.

2 changes: 1 addition & 1 deletion templateflow/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import pytest

from .. import api
from templateflow import api


class Bibtex:
Expand Down
Loading

0 comments on commit dad314f

Please sign in to comment.