def test_detect_phantomjs_fail(monkeypatch):
    monkeypatch.setenv("BOKEH_PHANTOMJS_PATH", "bad_path")
    with pytest.raises(RuntimeError):
        dep.detect_phantomjs()
def test_detect_phantomjs_success():
    assert dep.detect_phantomjs() is not None
Ejemplo n.º 3
0
 def test_detect_phantomjs_bad_version(self) -> None:
     with pytest.raises(RuntimeError) as e:
         dep.detect_phantomjs('10.1')
     assert str(e.value).endswith(
         "PhantomJS version to old. Version>=10.1 required, installed: 2.1.1"
     )
Ejemplo n.º 4
0
 def test_detect_phantomjs_bad_version(self):
     with pytest.raises(RuntimeError) as e:
         dep.detect_phantomjs('10.1')
     assert str(e).endswith("PhantomJS version to old. Version>=10.1 required, installed: 2.1.1")
Ejemplo n.º 5
0
 def test_detect_phantomjs_bad_path(self, monkeypatch):
     monkeypatch.setenv("BOKEH_PHANTOMJS_PATH", "bad_path")
     with pytest.raises(RuntimeError):
         dep.detect_phantomjs()
Ejemplo n.º 6
0
 def test_detect_phantomjs_success(self):
     assert dep.detect_phantomjs() is not None