2019-04-01 10:11:27 +00:00
|
|
|
# coding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2019-03-28 12:24:47 +00:00
|
|
|
from spacy.util import decaying
|
|
|
|
|
2019-04-01 10:11:27 +00:00
|
|
|
|
|
|
|
def test_issue3447():
|
|
|
|
sizes = decaying(10.0, 1.0, 0.5)
|
2019-03-28 12:24:47 +00:00
|
|
|
size = next(sizes)
|
2019-04-01 10:11:27 +00:00
|
|
|
assert size == 10.0
|
2019-03-28 12:24:47 +00:00
|
|
|
size = next(sizes)
|
2019-04-01 10:11:27 +00:00
|
|
|
assert size == 10.0 - 0.5
|
2019-03-28 12:24:47 +00:00
|
|
|
size = next(sizes)
|
2019-04-01 10:11:27 +00:00
|
|
|
assert size == 10.0 - 0.5 - 0.5
|