spaCy/spacy/tests/regression/test_issue3447.py
Samuel Kane 06a1846379 fix(util): fix decaying function output (#3495)
* fix(util): fix decaying function output

* fix(util): better test and adhere to code standards

* fix(util): correct variable name, pytestify test, update website text
2019-03-28 13:24:47 +01:00

11 lines
244 B
Python

from spacy.util import decaying
def test_decaying():
sizes = decaying(10., 1., .5)
size = next(sizes)
assert size == 10.
size = next(sizes)
assert size == 10. - 0.5
size = next(sizes)
assert size == 10. - 0.5 - 0.5