Skip to content

Commit

Permalink
Merge pull request #11 from probsys/20240225-fsaad-workflow
Browse files Browse the repository at this point in the history
Bump to Python 3.11
  • Loading branch information
fsaad authored Feb 25, 2024
2 parents 8d6647d + fe65183 commit 4fb9c0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6.15]
python-version: [3.11]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
'fldr.tests': 'tests',
},
extras_require={
'tests' : ['pytest', 'scipy']
'tests' : ['pytest', 'flaky', 'scipy']
}
)
4 changes: 3 additions & 1 deletion tests/test_fldr.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


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

num_failed_py = 0
@pytest.mark.parametrize('a', a_list)
@pytest.mark.flaky(max_runs=5, min_passes=1)
def test_fldr_sampler_py(a):
global num_failed_py
m = sum(a)
Expand All @@ -52,6 +53,7 @@ def test_fldr_sampler_py(a):

num_failed_c = 0
@pytest.mark.parametrize('a', a_list)
@pytest.mark.flaky(max_runs=5, min_passes=1)
def test_fldr_sampler_c(a):
global num_failed_c
m = sum(a)
Expand Down

0 comments on commit 4fb9c0b

Please sign in to comment.