Skip to content

Commit b93338f

Browse files
authored
Upgrade pytest dependency (#71)
I think the pytest-sugar bug is fixed. Also upgrade CI runner configurations and get rid of a deprecation warning. Once pytest 6 is released, we can use pyproject.toml for its configuration, but for now it needs its own file.
1 parent 518eeb1 commit b93338f

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ jobs:
44
build:
55
docker:
66
# https://circleci.com/docs/2.0/circleci-images/
7-
- image: circleci/python:3.8.1-buster-browsers
7+
- image: circleci/python:3.8.3-buster-browsers
88
working_directory: ~/repo
99
steps:
1010
- checkout
1111

1212
- restore_cache:
1313
keys:
14-
- v3-dependencies-{{ checksum "setup.py" }}
15-
- v3-dependencies-
14+
- v4-dependencies-{{ checksum "setup.py" }}
15+
- v4-dependencies-
1616

1717
- run:
1818
name: install dependencies
@@ -25,7 +25,7 @@ jobs:
2525
- save_cache:
2626
paths:
2727
- ./venv
28-
key: v3-dependencies-{{ checksum "setup.py" }}
28+
key: v4-dependencies-{{ checksum "setup.py" }}
2929

3030
- run:
3131
name: run tests

.github/workflows/ci.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
run: |
1616
sudo apt -y update
1717
sudo apt install -y chromium-chromedriver
18-
- uses: actions/checkout@v1.1.0
19-
- uses: actions/setup-python@v1.1.1
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
2020
with:
21-
python_version: ${{ matrix.python-version }}
21+
python-version: ${{ matrix.python-version }}
2222
architecture: x64
2323
- name: Store pip cache
24-
uses: actions/cache@v1
24+
uses: actions/cache@v2
2525
with:
2626
path: ~/.cache/pip
2727
key: pip-${{ runner.OS }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
@@ -39,12 +39,12 @@ jobs:
3939
pytest --cov=htexpr --cov-report=html --junitxml=results/pytest/junit.xml tests
4040
pytest --headless examples
4141
- name: Upload test report
42-
uses: actions/upload-artifact@v1.0.0
42+
uses: actions/upload-artifact@v2
4343
with:
4444
name: test-report
4545
path: results
4646
- name: Upload code coverage
47-
uses: actions/upload-artifact@v1.0.0
47+
uses: actions/upload-artifact@v2
4848
with:
4949
name: coverage-report
5050
path: htmlcov

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ exclude = '''
2020

2121
[build-system]
2222
requires = ["setuptools", "wheel"]
23+
24+
[tool.pytest.ini_options]
25+
junit_family = "xunit2"

pytest.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
junit_family=xunit2

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
"dash-bootstrap-components>=0.7.2,<0.11",
1818
]
1919
test_requirements = [
20-
"pytest~=5.3.0",
20+
"pytest~=5.4.3",
2121
"pytest-cov>=2.8.1,<2.11.0",
22-
# workaround for newer pytest:
23-
# "pytest-sugar @ git+https://github.com/GuillaumeFavelier/pytest-sugar.git@b56fed42d5c3022ff507ab6ce81cda65a3a5f92a#egg=pytest-sugar",
22+
"pytest-sugar~=0.9.3",
2423
"dash-core-components>=0.44,<1.11",
2524
"dash[testing]>=1.0.0,<1.14",
2625
"dash-html-components>=0.14,<1.1",

0 commit comments

Comments
 (0)