Skip to content

Commit

Permalink
Update to use textual-snapshot v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Jul 22, 2024
1 parent 6d0bec1 commit 8b4d638
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 163 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ jobs:
- name: Install dependencies for 3.12 # https://github.com/Textualize/textual/issues/3491#issuecomment-1854156476
run: poetry install --no-interaction
if: ${{ matrix.python-version == '3.12' }}
- name: Test with pytest
- name: Test with pytest (xdist)
run: |
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing -n 16 --dist=loadgroup
if: ${{ matrix.python-version != '3.12' }}
- name: Test with pytest for 3.12 # https://github.com/Textualize/textual/issues/3491#issuecomment-1854156476
run: |
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing -m 'not syntax'
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing -m 'not syntax' -n 16 --dist=loadgroup
if: ${{ matrix.python-version == '3.12' }}
- name: Upload snapshot report
if: always()
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ run := poetry run

.PHONY: test
test:
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv
$(run) pytest --cov-report term-missing --cov=textual tests/ -n 16 --dist=loadgroup $(ARGS)

.PHONY: unit-test
unit-test:
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv -m "not integration_test"
$(run) pytest --cov-report term-missing --cov=textual tests/ -m "not integration_test" -n 16 --dist=loadgroup $(ARGS)

.PHONY: test-snapshot-update
test-snapshot-update:
$(run) pytest --cov-report term-missing --cov=textual tests/ -vv --snapshot-update
$(run) pytest --cov-report term-missing --cov=textual tests/ --snapshot-update -n 16 --dist=loadgroup $(ARGS)

.PHONY: coverage
coverage:
Expand Down
51 changes: 20 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include = [
"Bug Tracker" = "https://github.com/Textualize/textual/issues"

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.8.1"
markdown-it-py = { extras = ["plugins", "linkify"], version = ">=2.1.0" }
rich = ">=13.3.3"
#rich = {path="../rich", develop=true}
Expand Down Expand Up @@ -68,12 +68,12 @@ pytest = "^8.3.1"
pytest-xdist = "^3.6.1"
pytest-asyncio = "*"
pytest-cov = "^2.12.1"
pytest-textual-snapshot = ">=0.4.0"
textual-dev = "^1.2.0"
types-setuptools = "^67.2.0.1"
types-tree-sitter = "^0.20.1.4"
types-tree-sitter-languages = "^1.7.0.1"
isort = "^5.13.2"
pytest-textual-snapshot = "^1.0.0"

[tool.pytest.ini_options]
asyncio_mode = "auto"
Expand Down
Loading

0 comments on commit 8b4d638

Please sign in to comment.