Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Sep 19, 2018
1 parent 81d50e1 commit 76c7d9d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 65 deletions.
56 changes: 12 additions & 44 deletions tests/data/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,80 +20,48 @@ def teardown_class(cls):

def test_area(self):
import lantern as l
l.area.sample()
l.area()

def test_bar(self):
import lantern as l
l.bar.sample()
l.bar()

def test_box(self):
import lantern as l
l.box.sample()
l.box()

def test_bubble(self):
import lantern as l
l.bubble.sample()

def test_groupedbar(self):
import lantern as l
l.groupedbar.sample()

def test_groupedhist(self):
import lantern as l
l.groupedhist.sample()

def test_groupedscatter(self):
import lantern as l
l.groupedscatter.sample()
l.bubble()

def test_heatmap(self):
import lantern as l
l.heatmap.sample()
l.heatmap()

def test_histogram(self):
import lantern as l
l.histogram.sample()

def test_horizontalbar(self):
import lantern as l
l.horizontalbar.sample()

def test_horizontalstackedbar(self):
import lantern as l
l.horizontalstackedbar.sample()
l.histogram()

def test_line(self):
import lantern as l
l.line.sample()
l.line()

def test_ohlc(self):
import lantern as l
l.ohlc.sample()
l.ohlc()

def test_ohlcv(self):
import lantern as l
l.ohlcv.sample()
l.ohlcv()

def test_pie(self):
import lantern as l
l.pie.sample()
l.pie()

def test_scatter(self):
import lantern as l
l.scatter.sample()

def test_stackedarea(self):
import lantern as l
l.stackedarea.sample()

def test_stackedbar(self):
import lantern as l
l.stackedbar.sample()

def test_stackedhist(self):
import lantern as l
l.stackedhist.sample()
l.scatter()

def test_timeseries(self):
import lantern as l
l.timeseries.sample()
l.timeseries()
2 changes: 1 addition & 1 deletion tests/grid/test_grid_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def teardown_class(cls):

def test_grid(self):
import lantern as l
df = l.bar.sample()
df = l.bar()
l.grid(df, 'plotly')
2 changes: 1 addition & 1 deletion tests/grid/test_grid_psp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def teardown_class(cls):

def test_grid(self):
import lantern as l
df = l.bar.sample()
df = l.bar()
l.grid(df, 'psp')
2 changes: 1 addition & 1 deletion tests/grid/test_grid_qgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def teardown_class(cls):

def test_grid(self):
import lantern as l
df = l.bar.sample()
df = l.bar()
l.grid(df, 'qgrid')
6 changes: 3 additions & 3 deletions tests/plot/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ def test_all(self):
with patch('lantern.plotting.plot_matplotlib.in_ipynb', create=True) as mock1:
import lantern as l
mock1.return_value = True
df = l.bar.sample()
df = l.bar()
l.plot(df, 'line', 'matplotlib')

def test_list(self):
with patch('lantern.plotting.plot_matplotlib.in_ipynb', create=True) as mock1:
import lantern as l
mock1.return_value = True
df = l.bar.sample()
df = l.bar()
l.plot(df, ['line' for _ in df], 'matplotlib')

def test_dict(self):
with patch('lantern.plotting.plot_matplotlib.in_ipynb', create=True) as mock1:
import lantern as l
mock1.return_value = True
df = l.bar.sample()
df = l.bar()
l.plot(df, {c: 'line' for c in df.columns}, 'matplotlib')
10 changes: 5 additions & 5 deletions tests/plot/test_plot_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_area(self):
import lantern as l
mock1.return_value = True
p = l.figure('bokeh')
df = l.bar.sample()
df = l.bar()
p.area(df)
p.show()

Expand All @@ -40,7 +40,7 @@ def test_bar(self):
import lantern as l
mock1.return_value = True
p = l.figure('bokeh')
df = l.bar.sample()
df = l.bar()
p.bar(df)
p.show()

Expand All @@ -52,7 +52,7 @@ def test_line(self):
import lantern as l
mock1.return_value = True
p = l.figure('bokeh')
df = l.bar.sample()
df = l.bar()
p.line(df)
p.show()

Expand All @@ -64,7 +64,7 @@ def test_scatter(self):
import lantern as l
mock1.return_value = True
p = l.figure('bokeh')
df = l.bar.sample()
df = l.bar()
p.scatter(df)
p.show()

Expand All @@ -76,6 +76,6 @@ def test_scatter(self):
# import lantern as l
# mock1.return_value = True
# p = l.figure('bokeh')
# df = l.bar.sample()
# df = l.bar()
# p.step(df)
# p.show()
10 changes: 5 additions & 5 deletions tests/plot/test_plot_matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_area(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.area(df)
p.show()

Expand All @@ -37,7 +37,7 @@ def test_bar(self):
import lantern as l
mock1.return_value = True
p = l.figure('matplotlib')
df = l.bar.sample()
df = l.bar()
p.bar(df)
p.show()

Expand All @@ -46,7 +46,7 @@ def test_line(self):
import lantern as l
mock1.return_value = True
p = l.figure('matplotlib')
df = l.bar.sample()
df = l.bar()
p.line(df)
p.show()

Expand All @@ -55,7 +55,7 @@ def test_scatter(self):
import lantern as l
mock1.return_value = True
p = l.figure('matplotlib')
df = l.bar.sample()
df = l.bar()
p.scatter(df)
p.show()

Expand All @@ -64,6 +64,6 @@ def test_step(self):
import lantern as l
mock1.return_value = True
p = l.figure('matplotlib')
df = l.bar.sample()
df = l.bar()
p.step(df)
p.show()
10 changes: 5 additions & 5 deletions tests/plot/test_plot_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_area(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.area(df)
p.show()

Expand All @@ -38,7 +38,7 @@ def test_bar(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.bar(df)
p.show()

Expand All @@ -49,7 +49,7 @@ def test_line(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.line(df)
p.show()

Expand All @@ -60,7 +60,7 @@ def test_scatter(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.scatter(df)
p.show()

Expand All @@ -71,6 +71,6 @@ def test_step(self):
import lantern as l
mock1.return_value = True
p = l.figure('cufflinks')
df = l.bar.sample()
df = l.bar()
p.step(df)
p.show()

0 comments on commit 76c7d9d

Please sign in to comment.