File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 31
31
32
32
pip install .
33
33
34
- pip install cython flake8 pytest
34
+ pip install cython flake8 pytest pytest-xdist
35
35
- name : Lint with flake8
36
36
run : |
37
37
source env/bin/activate
42
42
- name : Test with pytest
43
43
run : |
44
44
source env/bin/activate
45
- pytest tests/
45
+ pytest -n auto -m "not serial" tests/ && pytest -m "serial" tests/
Original file line number Diff line number Diff line change
1
+ [pytest]
2
+ markers =
3
+ serial: mark test that should be run serially
Original file line number Diff line number Diff line change 9
9
import igraph as ig
10
10
import numpy as np
11
11
import psutil
12
+ import pytest
12
13
import unittest
13
14
import warnings
14
15
@@ -59,6 +60,7 @@ def determine_target_parallelization_speedup(num_calculations=32):
59
60
return num_pool_calculations / num_calculations * base_duration / pool_duration
60
61
61
62
63
+ @pytest .mark .serial # these tests have to run serially for the parallel performance comparisons to make sense
62
64
class TestParallelLeidenPerformance (unittest .TestCase ):
63
65
@staticmethod
64
66
def run_singlelayer_graph_parallelization (G , gammas ):
You can’t perform that action at this time.
0 commit comments