Skip to content

Commit

Permalink
Merge pull request #3574 from aloctavodia/travis
Browse files Browse the repository at this point in the history
use service xvfb
  • Loading branch information
lucianopaz authored Jul 31, 2019
2 parents 6691d7e + edcaf75 commit 187028d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ addons:

before_install:
- . ./scripts/install_miniconda.sh
- sh -e /etc/init.d/xvfb start
- export DISPLAY=":99.0"
- export MKL_THREADING_LAYER=GNU

services:
- xvfb

install:
- . ./scripts/create_testenv.sh
- pip install coveralls
Expand Down
4 changes: 3 additions & 1 deletion pymc3/tests/test_distributions_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import numpy as np
import pytest
from .helpers import select_by_precision

pytestmark = pytest.mark.usefixtures('seeded_test')

Expand Down Expand Up @@ -92,7 +93,8 @@ def test_GARCH11():
z = Normal('z', mu=0, sigma=vol, shape=data.shape)
garch_like = t['y'].logp({'z':data, 'y': data})
reg_like = t['z'].logp({'z':data, 'y': data})
np.testing.assert_allclose(garch_like, reg_like)
decimal = select_by_precision(float64=7, float32=4)
np.testing.assert_allclose(garch_like, reg_like, 10**(-decimal))



Expand Down
9 changes: 8 additions & 1 deletion pymc3/tests/test_minibatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,14 @@ def test_multidim_scaling(self):
with pm.Model() as model5:
Normal('n', observed=[[1]], total_size=[2, Ellipsis, 2])
p5 = theano.function([], model5.logpt)
assert p0() == p1() == p2() == p3() == p4() == p5()
_p0 = p0()
assert (
np.allclose(_p0, p1()) and
np.allclose(_p0, p2()) and
np.allclose(_p0, p3()) and
np.allclose(_p0, p4()) and
np.allclose(_p0, p5())
)

def test_common_errors(self):
with pm.Model():
Expand Down

0 comments on commit 187028d

Please sign in to comment.