testplan.exporters.testing.pdf.renderers.entries package
Submodules
testplan.exporters.testing.pdf.renderers.entries.assertions module
TODO
- class testplan.exporters.testing.pdf.renderers.entries.assertions.ApproximateEqualityAssertionRenderer(style)[source]
Bases:
AssertionRenderer- Assertion renderer for serialized assertion entries:
IsClose
- class testplan.exporters.testing.pdf.renderers.entries.assertions.AssertionRenderer(style)[source]
Bases:
SerializedEntryRendererDefault fallback for rendering serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.ColumnContainRenderer(style)[source]
Bases:
AssertionRendererColumnContain renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.DictCheckRenderer(style)[source]
Bases:
AssertionRendererFixCheck renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.DictMatchAllRenderer(style)[source]
Bases:
AssertionRendererFixMatchAll renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.DictMatchRenderer(style)[source]
Bases:
AssertionRendererFixMatch renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.EqualExcludeSlicesRenderer(style)[source]
Bases:
AssertionRendererEqualExcludeSlices renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.EqualSlicesRenderer(style)[source]
Bases:
AssertionRendererEqualSlices renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.ExceptionRaisedRenderer(style)[source]
Bases:
AssertionRendererExceptionRaised renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.FunctionAssertionRenderer(style)[source]
Bases:
AssertionRenderer- Basic assertion renderer for serialized assertion entries:
Equal
NotEqual
Greater
GreaterEqual
Less
LessEqual
- class testplan.exporters.testing.pdf.renderers.entries.assertions.LineDiffRenderer(style)[source]
Bases:
AssertionRendererLineDiff renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.LogfileMatchRender(style)[source]
Bases:
AssertionRenderer
- class testplan.exporters.testing.pdf.renderers.entries.assertions.MembershipRenderer(style)[source]
Bases:
AssertionRendererContain & NotContain renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.RawAssertionRenderer(style)[source]
Bases:
AssertionRenderer
- class testplan.exporters.testing.pdf.renderers.entries.assertions.RegexFindIterRenderer(style)[source]
Bases:
RegexMatchRendererRegexFindIter renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.RegexMatchLineRenderer(style)[source]
Bases:
AssertionRendererRegexMatchLine renderer for serialized assertion entries.
- class testplan.exporters.testing.pdf.renderers.entries.assertions.RegexMatchRenderer(style)[source]
Bases:
AssertionRendererRegexMatch renderer for serialized assertion entries.
- bold = False
- get_detail(source, depth, row_idx)[source]
Return highlighted patterns within the string, if there is a match.
- highlight_color = 'green'
- class testplan.exporters.testing.pdf.renderers.entries.assertions.RegexNotMatchRenderer(style)[source]
Bases:
RegexMatchRendererRegexNotMatch renderer for serialized assertion entries.
- bold = True
- highlight_color = 'red'
- class testplan.exporters.testing.pdf.renderers.entries.assertions.TableMatchRenderer(style)[source]
Bases:
AssertionRendererRenders serialized tabular data in ReportLab table format.
- get_matched_row_data(row_comparison, columns, include_columns, exclude_columns, row_idx)[source]
Return a single row of data in the correct match format and the RowStyles indicating which cells need to be coloured red.
Sample output:
[{‘name’: Susan == Susan, ‘age’: 24 == 24}]
and
[RowStyle(…), …]
- Parameters:
row_comparison (
testplan.testing.multitest .entries.assertions.RowComparison) – RowComparison object containing this rows data.columns (
list) – List of the displayed columns.row_idx (
int) – Index of the row being compared. This is not the same as other row_idx parameters in this module. Those refer to the row index of the global table used to display everything in the PDF report.include_columns
exclude_columns
- Returns:
A single row of the matched data in tabular format and the RowStyles indicating which cells need to be coloured red.
- Return type:
listofdictandlistoftestplan.common.exporters.pdf.RowStyle
- class testplan.exporters.testing.pdf.renderers.entries.assertions.XMLCheckRenderer(style)[source]
Bases:
AssertionRendererXMLCheck renderer for serialized assertion entries.
testplan.exporters.testing.pdf.renderers.entries.base module
TODO
- class testplan.exporters.testing.pdf.renderers.entries.base.AttachmentRenderer(style)[source]
Bases:
SerializedEntryRendererRender an assertion of attaching file from a serialized entry.
- class testplan.exporters.testing.pdf.renderers.entries.base.DictLogRenderer(style)[source]
Bases:
SerializedEntryRendererRender a mapping object from a serialized entry.
- class testplan.exporters.testing.pdf.renderers.entries.base.DirectoryRenderer(style)[source]
Bases:
SerializedEntryRendererRender an assertion of attaching directory from a serialized entry.
- class testplan.exporters.testing.pdf.renderers.entries.base.GraphRenderer(style)[source]
Bases:
SerializedEntryRenderer
- class testplan.exporters.testing.pdf.renderers.entries.base.LogRenderer(style)[source]
Bases:
SerializedEntryRenderer
- class testplan.exporters.testing.pdf.renderers.entries.base.MatPlotRenderer(style)[source]
Bases:
SerializedEntryRendererRender a Matplotlib assertion from a serialized entry.
- class testplan.exporters.testing.pdf.renderers.entries.base.PlotlyRenderer(style)[source]
Bases:
SerializedEntryRendererRender a Plotly assertion from a serialized entry.
- class testplan.exporters.testing.pdf.renderers.entries.base.SerializedEntryRegistry[source]
Bases:
RegistryRegistry that is used for binding assertion classes to PDF renderers.
Keep in mind that we pass around serialized version of assertion objects (generated via multitest.entries.schemas) meaning that lookup arguments will be dictionary representation instead of assertion object instances, hence the need to use class names instead of class objects for data keys.
- get_category(obj)[source]
Override this to define logic for generating the category key from the object instance.
- class testplan.exporters.testing.pdf.renderers.entries.base.SerializedEntryRenderer(style)[source]
Bases:
BaseRowRendererDefault fallback for all serialized entries.
- get_row_content(source)[source]
All entries will either have a description or type, we display whatever is available.
- get_row_data(source, depth, row_idx)[source]
Most entries will be rendered as single rows, so we use get_row_content and get_row_style for simplicity.
- class testplan.exporters.testing.pdf.renderers.entries.base.TableLogRenderer(style)[source]
Bases:
SerializedEntryRendererRender a Table from a serialized entry.
testplan.exporters.testing.pdf.renderers.entries.baseUtils module
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.export_plot_to_image(graph_plot)[source]
Convert a MatPlot plot into an image readable in the pdf.
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.format_image(image)[source]
Resize the image.
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.get_axis_labels(graph_options)[source]
Return the X and Y axis labels from graph options.
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.get_colour(series_options, series_name)[source]
Return the graph colour for the series specified.
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.get_matlib_plot(source)[source]
Call the appropriate plotting function based on whether a graph or chart is being plotted.
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.get_xy_coords(data)[source]
Return two lists of x and y coordinates from graph data formatted for react-vis graphing (‘x’: Data, ‘y’: Data).
- testplan.exporters.testing.pdf.renderers.entries.baseUtils.plot_chart(source, graph_type)[source]
Create a MatPlot plot for any chart not requiring axes.
Module contents
Need to load these so registry bindings trigger