Skip to content

Commit

Permalink
remove test_vegalite_to_vega_mimebundle in test_mimebundle
Browse files Browse the repository at this point in the history
  • Loading branch information
mattijn committed Jan 8, 2023
1 parent a288f35 commit 6b82076
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions tests/utils/tests/test_mimebundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,6 @@ def vegalite_spec():
}


@pytest.mark.save_engine
@pytest.mark.parametrize("engine", ["vl-convert", "altair_saver", None])
def test_vegalite_to_vega_mimebundle(engine, vegalite_spec, vega_spec):
if engine == "vl-convert" and vlc is None:
pytest.skip("vl_convert not importable; cannot run mimebundle tests")
elif engine == "altair_saver" and altair_saver is None:
pytest.skip("altair_saver not importable; cannot run mimebundle tests")
elif vlc is None and altair_saver is None:
pytest.skip(
"Neither altair_saver nor vl_convert are importable;"
+ " cannot run mimebundle tests"
)

# temporary fix for https://github.com/vega/vega-lite/issues/7776
def delete_none(axes):
for axis in axes:
for key, value in list(axis.items()):
if value is None:
del axis[key]
return axes

bundle = spec_to_mimebundle(
spec=vegalite_spec,
format="vega",
mode="vega-lite",
vega_version=alt.VEGA_VERSION,
vegalite_version=alt.VEGALITE_VERSION,
vegaembed_version=alt.VEGAEMBED_VERSION,
engine=engine,
)

bundle["application/vnd.vega.v5+json"]["axes"] = delete_none(
bundle["application/vnd.vega.v5+json"]["axes"]
)
assert bundle == {"application/vnd.vega.v5+json": vega_spec}


def test_spec_to_vegalite_mimebundle(vegalite_spec):
bundle = spec_to_mimebundle(
spec=vegalite_spec,
Expand Down

0 comments on commit 6b82076

Please sign in to comment.