Skip to content

Commit 7a89676

Browse files
committed
Add test for minidom
1 parent 83f8af8 commit 7a89676

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,24 @@ jobs:
133133
conda activate anaconda-client-env
134134
python setup.py build_ext --inplace
135135
136+
- name: Minidom test
137+
working-directory: python
138+
# Importing either IPython or pytest causes import of xml.dom.minidom
139+
# So to actually test that tskit imports it, we need a minimal test
140+
run: |
141+
source ~/.profile
142+
conda activate anaconda-client-env
143+
python -c "import tskit;tskit.Tree.generate_star(5).tree_sequence.draw_svg(path='test.svg')"
144+
136145
- name: Run tests
137146
working-directory: python
138147
run: |
139148
source ~/.profile
140149
conda activate anaconda-client-env
141150
python -m pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests
142151
152+
153+
143154
- name: Upload coverage to Codecov
144155
uses: codecov/codecov-action@v5.4.0
145156
with:

python/tests/test_drawing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import pathlib
3232
import platform
3333
import re
34-
import xml.dom.minidom
3534
import xml.etree
3635

3736
import msprime

0 commit comments

Comments
 (0)