|
| 1 | +import render |
| 2 | + |
| 3 | +defined_plots = {'bar-counts': ['pandas', 'plotnine', 'ggplot'], |
| 4 | + 'dodged-bar-chart': ['pandas', 'plotnine', 'ggplot'], |
| 5 | + 'scatter-plot': ['pandas', 'plotnine', 'ggplot'], |
| 6 | + 'scatter-plot-with-colors': ['matplotlib', |
| 7 | + 'seaborn', |
| 8 | + 'plotnine', |
| 9 | + 'ggplot'], |
| 10 | + 'scatter-plot-with-facet': ['seaborn', 'plotnine', 'ggplot'], |
| 11 | + 'scatter-plot-with-facets': ['seaborn', 'plotnine', 'ggplot'], |
| 12 | + 'scatter-plot-with-size': ['pandas', 'plotnine', 'ggplot'], |
| 13 | + 'scatter-with-regression': ['seaborn', 'plotnine', 'ggplot'], |
| 14 | + 'simple-histogram': ['pandas', 'matplotlib', 'plotnine', 'ggplot', 'bokeh'], |
| 15 | + 'stacked-bar-chart': ['pandas', 'plotnine', 'ggplot'], |
| 16 | + 'stacked-kde': ['pandas', 'seaborn', 'plotnine', 'ggplot'], |
| 17 | + 'stacked-smooth-line-and-scatter': ['plotnine', 'ggplot'], |
| 18 | + 'timeseries': ['pandas', 'plotnine', 'ggplot']} |
| 19 | + |
| 20 | + |
| 21 | +def test_exist(): |
| 22 | + plots = render.extract_cells("Examples.ipynb") |
| 23 | + for name, slug in plots: |
| 24 | + names = [d['package-slug'] for d in plots[(name, slug)]] |
| 25 | + assert set(names) == set(defined_plots[slug]) |
0 commit comments