Skip to content

Commit c712685

Browse files
authored
Merge pull request #686 from xgi-org/fix-test-collection
Fix slow test collection and matplotlib GUI popups
2 parents cc32ef6 + 42d3a26 commit c712685

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/test-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
pytest --color=yes
3737
# run doctests
3838
cd ../xgi/
39-
pytest --color=yes
39+
pytest --doctest-modules --color=yes

conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import matplotlib
2+
3+
matplotlib.use("Agg")

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ where = ["."]
106106
attr = "xgi.__version__"
107107

108108
[tool.pytest.ini_options]
109-
# always run doctests
110-
addopts = "--doctest-modules --ignore=docs"
109+
addopts = "--ignore=docs"
111110

112111
# custom markers
113112
markers = [

xgi/stats/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ def name(self):
113113
('degree', 'degree(order=3)')
114114
>>> H.nodes.multi([da, d3]).asdict(transpose=True).keys()
115115
dict_keys(['degree', 'degree(order=3)'])
116-
>>> H.nodes.multi([da, d3]).aspandas().columns
117-
Index(['degree', 'degree(order=3)'], dtype='object')
116+
>>> cols = H.nodes.multi([da, d3]).aspandas().columns
117+
>>> list(cols)
118+
['degree', 'degree(order=3)']
118119
119120
"""
120121
name = f"{self.func.__name__}"

0 commit comments

Comments
 (0)