def test_render_profiled_fixture_evrs(
        tetanus_varicella_basic_dataset_profiler_evrs):
    rendered_json = DescriptivePageRenderer.render(
        tetanus_varicella_basic_dataset_profiler_evrs)
    rendered_page = DefaultJinjaPageView.render(rendered_json)

    with open('./tests/render/output/test_render_profiled_fixture_evrs.html',
              'w') as f:
        f.write(rendered_page)

    assert rendered_page[:15] == "<!DOCTYPE html>"
    assert rendered_page[-7:] == "</html>"
示例#2
0
def test_full_oobe_flow():
    df = ge.read_csv("examples/data/Titanic.csv")
    df.profile(BasicDatasetProfiler)
    evrs = df.validate()  # ["results"]

    rendered_json = DescriptivePageRenderer.render(evrs)
    rendered_page = DefaultJinjaPageView.render(rendered_json)

    with open('./tests/render/output/test_full_oobe_flow.html', 'w') as f:
        f.write(rendered_page)

    assert rendered_page[:15] == "<!DOCTYPE html>"
    assert rendered_page[-7:] == "</html>"
示例#3
0
def render(render_object):
    """Render a great expectations object to documentation.

    RENDER_OBJECT: path to a GE object to render
    """
    with open(render_object, "r") as infile:
        raw = json.load(infile)

    if "results" in raw:
        model = DescriptivePageRenderer.render(raw)
    else:
        model = PrescriptivePageRenderer.render(raw)
    print(DefaultJinjaPageView.render(model))
def test_smoke_render_descriptive_page_renderer_with_exception(
        tetanus_varicella_basic_dataset_profiler_evrs_with_exception):
    rendered_json = DescriptivePageRenderer.render(
        tetanus_varicella_basic_dataset_profiler_evrs_with_exception)
    rendered_page = DefaultJinjaPageView.render(rendered_json)

    with open(
            './tests/render/output/test_render_descriptive_column_section_renderer_with_exception.html',
            'w') as f:
        f.write(rendered_page)

    assert rendered_page[:15] == "<!DOCTYPE html>"
    assert rendered_page[-7:] == "</html>"
    assert "exception" in rendered_page