Skip to content

Commit

Permalink
Replace pytest-timeout with a simple tick-tock
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanmv committed Jan 22, 2023
1 parent 41486bf commit 06d0ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dev = [
"pytest-cov[toml]",
"pytest-xdist",
"pytest-benchmark >= 4.0.0",
"pytest-timeout"
]

[project.urls]
Expand Down
5 changes: 4 additions & 1 deletion tests/polys/test_primitive_polys.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
----------
* https://baylor-ir.tdl.org/bitstream/handle/2104/8793/GF3%20Polynomials.pdf?sequence=1&isAllowed=y
"""
import time
import numpy as np
import pytest

Expand Down Expand Up @@ -202,10 +203,12 @@ def test_minimum_terms(order, degree, polys):
assert f.coeffs.tolist() in min_term_polys


@pytest.mark.timeout(1, method="signal")
@pytest.mark.parametrize("order,degree,polys", PARAMS_DB)
def test_minimum_terms_from_database(order, degree, polys):
tick = time.time()
p = galois.primitive_poly(order, degree, terms="min")
tock = time.time()
assert tock - tick < 1.0
db_degrees = p.nonzero_degrees.tolist()
db_coeffs = p.nonzero_coeffs.tolist()
exp_degrees, exp_coeffs = polys
Expand Down

0 comments on commit 06d0ab9

Please sign in to comment.