Skip to content

Commit e36ee09

Browse files
committed
Fix test_many_repeated_spaces on darwin
Replace `timeout_decorator` with `wrapt-timeout-decorator` to fix exceptions during testing. Fixes #177
1 parent 94f1a66 commit e36ee09

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ chardet
33
nose
44
pep8
55
coverage
6-
timeout_decorator
6+
wrapt-timeout-decorator

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
test_deps = [
2525
# Test timeouts
26-
"timeout_decorator",
26+
"wrapt-timeout-decorator",
2727
]
2828

2929
extras = {

tests/test_article_only.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import unittest
33

44
from readability import Document
5-
import timeout_decorator
6-
5+
from wrapt_timeout_decorator import *
76

87
SAMPLES = os.path.join(os.path.dirname(__file__), "samples")
98

@@ -101,7 +100,7 @@ def test_correct_cleanup(self):
101100
assert not "aside" in s
102101

103102
# Many spaces make some regexes run forever
104-
@timeout_decorator.timeout(seconds=3, use_signals=False)
103+
@timeout(3, use_signals=False)
105104
def test_many_repeated_spaces(self):
106105
long_space = " " * 1000000
107106
sample = "<html><body><p>foo" + long_space + "</p></body></html>"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
envlist =
8-
py{27,35,36,37,38,py,py3}, doc
8+
py{27,35,36,37,38,39,310,py,py3}, doc
99
skip_missing_interpreters =
1010
True
1111

0 commit comments

Comments
 (0)