Skip to content

Commit 5c09f80

Browse files
committed
add timeouts
1 parent 8a82b15 commit 5c09f80

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,5 @@ install:
5757
- pushd python && python setup.py install && popd
5858

5959
script:
60-
- ls
6160
- cd ../TopicNet/topicnet
62-
- py.test .
61+
- py.test . --timeout=20

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ six
55
scipy
66
numexpr
77
pytest
8+
pytest-timeout
89
pandas
910
tqdm
1011
dask

topicnet/tests/test_pipeline.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ def resource_teardown():
2424

2525

2626
def setup_function():
27-
sleep(1)
2827
resource_teardown()
29-
sleep(1)
3028

3129

3230
def teardown_function():
33-
sleep(1)
3431
resource_teardown()
35-
sleep(1)
3632

3733

3834
@pytest.fixture(scope="function")
@@ -225,6 +221,8 @@ def test_simple_pipeline(experiment_enviroment):
225221
tm, dataset, experiment, dictionary, cube_settings = experiment_enviroment
226222

227223
experiment.build(cube_settings)
224+
# an ugly workaround for strange multithreading issue
225+
sleep(2)
228226
with pytest.warns(UserWarning, match="Not enough models for"):
229227
final_models = experiment.run(dataset, verbose=False, nb_verbose=False)
230228

0 commit comments

Comments
 (0)