After updating the local repo there seems to be no failed Selenium tests.
But still there are some failed Test_autoload_static
tests.
Will it be all right if I skip Selenium
tests when running the tests locally ?!
What are the Test_autoload_static
tests ? is it all right if they fail ?
Test output
==================================================================================================== FAILURES =====================================================================================================
_________________________________________________________________________________ Test_autoload_static.test_js_dev_cdn[1.4.0rc1] __________________________________________________________________________________
self = <test_standalone.Test_autoload_static object at 0x7fc5553d90a0>, version = '1.4.0rc1', monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc55547c8e0>
driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="bdc97e65f12e65032c7ef2ee9ec9da75")>
test_file_path_and_url = ('/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_dev_cdn.html', 'http://127.0.0.1:8000//home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_dev_cdn.html')
test_plot = Figure(id='8928', ...)
@pytest.mark.parametrize("version", ["1.4.0rc1", "2.0.0dev3"])
@pytest.mark.selenium
def test_js_dev_cdn(self, version, monkeypatch, driver, test_file_path_and_url, test_plot) -> None:
monkeypatch.setattr(buv, "__version__", "1.4.0rc1")
monkeypatch.setattr(resources, "__version__", "1.4.0rc1")
js, tag = bes.autoload_static(test_plot, CDN, "some/path")
page = PAGE.render(js=js, tag=tag)
path, url = test_file_path_and_url
with open(path, "w") as f:
f.write(page)
driver.get(url)
scripts = driver.find_elements_by_css_selector('head script')
> assert len(scripts) == 4
E assert 0 == 4
E + where 0 = len([])
tests/unit/bokeh/embed/test_standalone.py:105: AssertionError
_________________________________________________________________________________ Test_autoload_static.test_js_dev_cdn[2.0.0dev3] _________________________________________________________________________________
self = <test_standalone.Test_autoload_static object at 0x7fc555649310>, version = '2.0.0dev3', monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc55555df70>
driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="bdc97e65f12e65032c7ef2ee9ec9da75")>
test_file_path_and_url = ('/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_dev_cdn.html', 'http://127.0.0.1:8000//home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_dev_cdn.html')
test_plot = Figure(id='9008', ...)
@pytest.mark.parametrize("version", ["1.4.0rc1", "2.0.0dev3"])
@pytest.mark.selenium
def test_js_dev_cdn(self, version, monkeypatch, driver, test_file_path_and_url, test_plot) -> None:
monkeypatch.setattr(buv, "__version__", "1.4.0rc1")
monkeypatch.setattr(resources, "__version__", "1.4.0rc1")
js, tag = bes.autoload_static(test_plot, CDN, "some/path")
page = PAGE.render(js=js, tag=tag)
path, url = test_file_path_and_url
with open(path, "w") as f:
f.write(page)
driver.get(url)
scripts = driver.find_elements_by_css_selector('head script')
> assert len(scripts) == 4
E assert 0 == 4
E + where 0 = len([])
tests/unit/bokeh/embed/test_standalone.py:105: AssertionError
____________________________________________________________________________________ Test_autoload_static.test_js_release_cdn _____________________________________________________________________________________
self = <test_standalone.Test_autoload_static object at 0x7fc55556b130>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc55552e0d0>
driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="bdc97e65f12e65032c7ef2ee9ec9da75")>
test_file_path_and_url = ('/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_cdn.html', 'http://127.0.0.1:8000//home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_cdn.html')
test_plot = Figure(id='9088', ...)
@pytest.mark.selenium
def test_js_release_cdn(self, monkeypatch, driver, test_file_path_and_url, test_plot) -> None:
monkeypatch.setattr(buv, "__version__", "2.0.0")
monkeypatch.setattr(resources, "__version__", "2.0.0")
js, tag = bes.autoload_static(test_plot, CDN, "some/path")
page = PAGE.render(js=js, tag=tag)
path, url = test_file_path_and_url
with open(path, "w") as f:
f.write(page)
driver.get(url)
scripts = driver.find_elements_by_css_selector('head script')
for x in scripts:
print(x.get_attribute("src"))
> assert len(scripts) == 4
E assert 0 == 4
E + where 0 = len([])
tests/unit/bokeh/embed/test_standalone.py:127: AssertionError
__________________________________________________________________________________ Test_autoload_static.test_js_release_dev_cdn ___________________________________________________________________________________
self = <test_standalone.Test_autoload_static object at 0x7fc555538970>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc5555ca6d0>
driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="bdc97e65f12e65032c7ef2ee9ec9da75")>
test_file_path_and_url = ('/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_dev_cdn.html', 'http://127.0.0.1:8000//home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_dev_cdn.html')
test_plot = Figure(id='9168', ...)
@pytest.mark.selenium
def test_js_release_dev_cdn(self, monkeypatch, driver, test_file_path_and_url, test_plot) -> None:
monkeypatch.setattr(buv, "__version__", "2.0.0-foo")
monkeypatch.setattr(resources, "__version__", "2.0.0-foo")
js, tag = bes.autoload_static(test_plot, CDN, "some/path")
page = PAGE.render(js=js, tag=tag)
path, url = test_file_path_and_url
with open(path, "w") as f:
f.write(page)
driver.get(url)
scripts = driver.find_elements_by_css_selector('head script')
for x in scripts:
print(x.get_attribute("src"))
> assert len(scripts) == 4
E assert 0 == 4
E + where 0 = len([])
tests/unit/bokeh/embed/test_standalone.py:149: AssertionError
___________________________________________________________________________________ Test_autoload_static.test_js_release_server ___________________________________________________________________________________
self = <test_standalone.Test_autoload_static object at 0x7fc555562a60>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc555562e20>
driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="bdc97e65f12e65032c7ef2ee9ec9da75")>
test_file_path_and_url = ('/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_server.html', 'http://127.0.0.1:8000//home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/embed/test_js_release_server.html')
test_plot = Figure(id='9248', ...)
@pytest.mark.selenium
def test_js_release_server(self, monkeypatch, driver, test_file_path_and_url, test_plot) -> None:
monkeypatch.setattr(buv, "__version__", "2.0.0")
monkeypatch.setattr(resources, "__version__", "2.0.0")
js, tag = bes.autoload_static(test_plot, resources.Resources(mode="server"), "some/path")
page = PAGE.render(js=js, tag=tag)
path, url = test_file_path_and_url
with open(path, "w") as f:
f.write(page)
driver.get(url)
scripts = driver.find_elements_by_css_selector('head script')
> assert len(scripts) == 4
E assert 0 == 4
E + where 0 = len([])
tests/unit/bokeh/embed/test_standalone.py:169: AssertionError
================================================================================================ warnings summary =================================================================================================
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/pytest_asyncio/plugin.py:39: 67 tests with warnings
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/pytest_asyncio/plugin.py:39: PytestDeprecationWarning: direct construction of Function has been deprecated, please use Function.from_parent
item = pytest.Function(name, parent=collector)
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/pytest_asyncio/plugin.py:45: 67 tests with warnings
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/pytest_asyncio/plugin.py:45: PytestDeprecationWarning: direct construction of Function has been deprecated, please use Function.from_parent
item = pytest.Function(name, parent=collector) # To reload keywords.
tests/unit/bokeh/document/_util_document.py:38
/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/document/_util_document.py:38: RuntimeWarning: Property "name" in class Model was overridden by a class attribute "name" in class ModelThatOverridesName; it never makes sense to do this. Either Model.name or ModelThatOverridesName.name should be removed, or Model.name should not be a Property, or use Override(), depending on the intended effect.
class ModelThatOverridesName(Model):
tests/unit/bokeh/test_model.py::test_all_builtin_models_default_constructible
BokehDeprecationWarning: 'WidgetBox' is deprecated and will be removed in Bokeh 3.0, use 'bokeh.models.Column' instead
tests/unit/bokeh/application/handlers/test_directory.py::Test_DirectoryHandler::test_directory_mainipynb_adds_roots
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/IPython/core/inputsplitter.py:21: DeprecationWarning: IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`
warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`',
tests/unit/bokeh/core/test_json_encoder.py::TestBokehJSONEncoder::test_numpyint
/home/arion/PROJECTS/GSoC 2020/bokeh/tests/unit/bokeh/core/test_json_encoder.py:69: DeprecationWarning: np.asscalar(a) is deprecated since NumPy v1.16, use a.item() instead
npint = np.asscalar(np.int64(1))
tests/unit/bokeh/core/property/test_bases.py::TestProperty::test_matches_incompatible_arrays
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/numpy/core/numeric.py:2327: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
return bool(asarray(a1 == a2).all())
tests/unit/bokeh/plotting/test__lengends.py: 16 tests with warnings
BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead
tests/unit/bokeh/sampledata/test_airports.py::Test___all__::test___all__
/home/arion/PROJECTS/GSoC 2020/bokeh/bokeh/sampledata/airports.py:64: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead
data = pd.io.json.json_normalize(airports['features'], meta=schema)
tests/unit/bokeh/server/test_server__server.py::test__autocreate_signed_session_autoload
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/asyncio/base_events.py:431: RuntimeWarning: coroutine 'WebSocketProtocol13.write_message.<locals>.wrapper' was never awaited
task = tasks.Task(coro, loop=self, name=name)
tests/unit/bokeh/util/test_version.py::Test__base_version_helper::test_rc_version_stripped
/home/arion/anaconda3/miniconda/envs/bokeh-dev/lib/python3.8/site-packages/_pytest/fixtures.py:871: DeprecationWarning: URLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
func()
-- Docs: https://docs.pytest.org/en/latest/warnings.html
===Flaky Test Report===
test_ping passed 1 out of the required 1 times. Success!
test_next_tick_runs passed 1 out of the required 1 times. Success!
test_timeout_runs passed 1 out of the required 1 times. Success!
test_periodic_runs passed 1 out of the required 1 times. Success!
test_next_tick_does_not_run_if_removed_immediately passed 1 out of the required 1 times. Success!
test_timeout_does_not_run_if_removed_immediately passed 1 out of the required 1 times. Success!
test_periodic_does_not_run_if_removed_immediately passed 1 out of the required 1 times. Success!
test_same_callback_as_all_three_types passed 1 out of the required 1 times. Success!
test_adding_next_tick_twice passed 1 out of the required 1 times. Success!
test_adding_timeout_twice passed 1 out of the required 1 times. Success!
test_adding_periodic_twice passed 1 out of the required 1 times. Success!
test_remove_all_callbacks passed 1 out of the required 1 times. Success!
test_removing_next_tick_twice passed 1 out of the required 1 times. Success!
test_removing_timeout_twice passed 1 out of the required 1 times. Success!
test_removing_periodic_twice passed 1 out of the required 1 times. Success!
test_adding_next_tick_from_another_thread passed 1 out of the required 1 times. Success!
test__lifecycle_hooks passed 1 out of the required 1 times. Success!
===End Flaky Test Report===
============================================================================================= short test summary info =============================================================================================
FAILED tests/unit/bokeh/embed/test_standalone.py::Test_autoload_static::test_js_dev_cdn[1.4.0rc1] - assert 0 == 4
FAILED tests/unit/bokeh/embed/test_standalone.py::Test_autoload_static::test_js_dev_cdn[2.0.0dev3] - assert 0 == 4
FAILED tests/unit/bokeh/embed/test_standalone.py::Test_autoload_static::test_js_release_cdn - assert 0 == 4
FAILED tests/unit/bokeh/embed/test_standalone.py::Test_autoload_static::test_js_release_dev_cdn - assert 0 == 4
FAILED tests/unit/bokeh/embed/test_standalone.py::Test_autoload_static::test_js_release_server - assert 0 == 4
======================================================================= 5 failed, 4310 passed, 6 skipped, 158 warnings in 273.79s (0:04:33) =======================================================================
Also it’ll be of great help if a short guide / link to a guide is given in the docs to set up Selenium.