Commit c437b2b1 authored by Romain Casati's avatar Romain Casati
Browse files

Testing Pandas.

parent a46c17d8
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
.dataframe tbody tr th {
vertical-align: top;
.dataframe thead th {
text-align: right;
<table border="1" class="dataframe">
<tr style="text-align: right;">
\ No newline at end of file
from pathlib import Path
import re
_test_data = Path(__file__).parent / "data"
def test_all(selenium):
# ensure all hacked modules are tested
......@@ -30,8 +32,20 @@ def test_folium(selenium):
def test_pandas(selenium):
#assert False
result = selenium.run_basthon("""
import pandas as pd
df = pd.DataFrame({
'language': ["Python", "C", "Java"],
'verbosity': [0.1, 0.5, 0.9]
assert result['stderr'] == ""
assert result['display']['display_type'] == 'html'
with open(_test_data / "pandas.html") as f:
assert result['display']['content'] ==
def test_sympy(selenium):
......@@ -57,6 +71,6 @@ def test_turtle(selenium):
# bypassing it via JS
svg = selenium.run_js("return window._basthon_eval_data.display.content.outerHTML")
svg = re.sub('\"af_[0-9a-f]+_', '\"af_', svg)
with open(Path(__file__).parent / 'data' / 'turtle.svg') as f:
with open(_test_data / 'turtle.svg') as f:
target =
assert svg == target
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment