コード例 #1
0
def test_detect_phantomjs_fail(monkeypatch):
    monkeypatch.setenv("BOKEH_PHANTOMJS_PATH", "bad_path")
    with pytest.raises(RuntimeError):
        dep.detect_phantomjs()
コード例 #2
0
def test_detect_phantomjs_success():
    assert dep.detect_phantomjs() is not None
コード例 #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"
     )
コード例 #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")
コード例 #5
0
 def test_detect_phantomjs_bad_path(self, monkeypatch):
     monkeypatch.setenv("BOKEH_PHANTOMJS_PATH", "bad_path")
     with pytest.raises(RuntimeError):
         dep.detect_phantomjs()
コード例 #6
0
 def test_detect_phantomjs_success(self):
     assert dep.detect_phantomjs() is not None