Skip to content

Commit

Permalink
Merge pull request #1098 from nschloe/pytest-codeblocks
Browse files Browse the repository at this point in the history
use pytest-codeblocks
  • Loading branch information
nschloe authored May 7, 2021
2 parents e0cd69d + 3a047a2 commit e8a5079
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ meshio-ascii input.msh # convert to ASCII format
with any of the supported formats.

In Python, simply do
<!--exdown-skip-->
<!--pytest-codeblocks:skip-->
```python
import meshio

Expand Down Expand Up @@ -123,15 +123,15 @@ For both input and output, you can optionally specify the exact `file_format`

The [XDMF format](https://www.xdmf.org/index.php/XDMF_Model_and_Format) supports time
series with a shared mesh. You can write times series data using meshio with
<!--exdown-skip-->
<!--pytest-codeblocks:skip-->
```python
with meshio.xdmf.TimeSeriesWriter(filename) as writer:
writer.write_points_cells(points, cells)
for t in [0.0, 0.1, 0.21]:
writer.write_data(t, point_data={"phi": data})
```
and read it with
<!--exdown-skip-->
<!--pytest-codeblocks:skip-->
```python
with meshio.xdmf.TimeSeriesReader(filename) as reader:
points, cells = reader.read_points_cells()
Expand Down
7 changes: 0 additions & 7 deletions tests/test_readme.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ isolated_build = True

[testenv]
deps =
exdown
pytest
pytest-codeblocks
pytest-cov
extras = all
commands =
pytest {posargs}
pytest {posargs} --codeblocks

0 comments on commit e8a5079

Please sign in to comment.