Skip to content

Commit 2b3dfe4

Browse files
authored
Merge pull request #751 from jadchaar/testsuite-revamp
Transition testing framework to pytest
2 parents c856ab9 + c1ca3b0 commit 2b3dfe4

19 files changed

+4571
-5078
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ build27 build35 build36 build37 build38:
1414
venv/bin/pre-commit install
1515

1616
test:
17-
rm -f .coverage
18-
. venv/bin/activate && nosetests
17+
rm -f .coverage coverage.xml
18+
. venv/bin/activate && pytest
1919

2020
lint:
2121
venv/bin/pre-commit run --all-files --show-diff-on-failure
@@ -27,7 +27,7 @@ docs:
2727
clean:
2828
rm -rf venv .tox ./**/__pycache__
2929
rm -rf dist build .egg .eggs arrow.egg-info
30-
rm -f ./**/*.pyc .coverage
30+
rm -f ./**/*.pyc .coverage coverage.xml
3131

3232
publish:
3333
rm -rf dist build .egg .eggs arrow.egg-info

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
backports.functools_lru_cache==1.6.1; python_version == "2.7"
2-
chai==1.1.2
32
dateparser==0.7.*
4-
mock==3.0.*
5-
nose==1.3.7
6-
nose-cov==1.6
73
pre-commit==1.20.*
4+
pytest==4.6.*; python_version == "2.7"
5+
pytest==5.3.*; python_version >= "3.5"
6+
pytest-cov==2.8.*
7+
pytest-mock==2.0.*
88
python-dateutil==2.8.*
99
pytz==2019.*
1010
simplejson==3.16.*

setup.cfg

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
1-
[nosetests]
2-
where = tests
3-
verbosity = 2
4-
all-modules = true
5-
with-coverage = true
6-
cover-min-percentage = 100
7-
cover-package = arrow
8-
cover-erase = true
9-
10-
[coverage:run]
11-
branch = true
12-
source =
13-
arrow
14-
tests
15-
16-
[coverage:report]
17-
show_missing = true
18-
fail_under = 100
19-
20-
[flake8]
21-
per-file-ignores = arrow/__init__.py:F401
22-
ignore = E203,E501,W503
1+
[tool:pytest]
2+
addopts = -v --cov-branch --cov=arrow tests --cov-fail-under=100 --cov-report=term-missing --cov-report=xml
233

244
[tool:isort]
255
line_length = 88
266
multi_line_output = 3
277
include_trailing_comma = true
28-
known_third_party = chai,dateparser,dateutil,mock,pytz,setuptools,simplejson
8+
known_third_party = dateparser,dateutil,pytest,pytz,setuptools,simplejson
9+
10+
[flake8]
11+
per-file-ignores = arrow/__init__.py:F401
12+
ignore = E203,E501,W503
2913

3014
[bdist_wheel]
3115
universal = 1

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
"python-dateutil",
2828
"backports.functools_lru_cache>=1.2.1;python_version=='2.7'",
2929
],
30-
test_suite="tests",
31-
tests_require=["chai", "mock"],
3230
classifiers=[
3331
"Development Status :: 4 - Beta",
3432
"Intended Audience :: Developers",

tests/api_tests.py

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

0 commit comments

Comments
 (0)