Skip to content

Commit 4fb9c0b

Browse files
authored
Merge pull request #11 from probsys/20240225-fsaad-workflow
Bump to Python 3.11
2 parents 8d6647d + fe65183 commit 4fb9c0b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/python-package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: [3.6.15]
19+
python-version: [3.11]
2020

2121
steps:
2222
- uses: actions/checkout@v2

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
'fldr.tests': 'tests',
3737
},
3838
extras_require={
39-
'tests' : ['pytest', 'scipy']
39+
'tests' : ['pytest', 'flaky', 'scipy']
4040
}
4141
)

tests/test_fldr.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def get_chisquare_pval(p_target, samples):
20-
f_expected = [int(len(samples)*p) for p in p_target]
20+
f_expected = [len(samples)*p for p in p_target]
2121
counts = Counter(samples)
2222
f_actual = [counts[k] for k in range(len(p_target))]
2323
return chisquare(f_expected, f_actual)[1]
@@ -35,6 +35,7 @@ def get_chisquare_pval(p_target, samples):
3535

3636
num_failed_py = 0
3737
@pytest.mark.parametrize('a', a_list)
38+
@pytest.mark.flaky(max_runs=5, min_passes=1)
3839
def test_fldr_sampler_py(a):
3940
global num_failed_py
4041
m = sum(a)
@@ -52,6 +53,7 @@ def test_fldr_sampler_py(a):
5253

5354
num_failed_c = 0
5455
@pytest.mark.parametrize('a', a_list)
56+
@pytest.mark.flaky(max_runs=5, min_passes=1)
5557
def test_fldr_sampler_c(a):
5658
global num_failed_c
5759
m = sum(a)

0 commit comments

Comments
 (0)