← Về thư mục
tests/matplotlib/test_scripts.py
- FigureTestCase · class · L52-L54 — class FigureTestCase(unittest.TestCase)
- setUp · method · L53-L54 — def setUp(self) -> None
- StylePresetTests · class · L57-L97 — class StylePresetTests(unittest.TestCase)
- test_presets_exist_and_are_named_dictionaries · method · L58-L63 — def test_presets_exist_and_are_named_dictionaries(self) -> None
- test_every_preset_key_is_a_real_rcparam · method · L65-L72 — def test_every_preset_key_is_a_real_rcparam(self) -> None: # matplotlib ignores unknown rcParams silently, so a typo here is # invisible until someone notices the figure looks wrong.
- test_every_preset_applies_cleanly · method · L74-L79 — def test_every_preset_applies_cleanly(self) -> None
- test_the_publication_preset_saves_at_print_resolution · method · L81-L84 — def test_the_publication_preset_saves_at_print_resolution(self) -> None
- test_every_documented_preset_is_defined · method · L86-L97 — def test_every_documented_preset_is_defined(self) -> None
- StyleFileTests · class · L100-L143 — class StyleFileTests(unittest.TestCase)
- test_a_saved_style_is_loadable_by_matplotlib · method · L101-L112 — def test_a_saved_style_is_loadable_by_matplotlib(self) -> None: # The real contract: matplotlib must be able to read what we wrote.
- test_the_file_is_commented_and_grouped · method · L114-L123 — def test_the_file_is_commented_and_grouped(self) -> None
- test_sequence_values_are_written_comma_separated · method · L125-L134 — def test_sequence_values_are_written_comma_separated(self) -> None: #
font.sans-serif is a list; mplstyle wants a, b, not ['a', 'b'].
- test_an_empty_style_still_writes_a_valid_file · method · L136-L143 — def test_an_empty_style_still_writes_a_valid_file(self) -> None
- SampleDataTests · class · L146-L169 — class SampleDataTests(unittest.TestCase)
- test_the_sample_data_covers_every_plot_type · method · L147-L150 — def test_the_sample_data_covers_every_plot_type(self) -> None
- test_the_sample_data_is_deterministic · method · L152-L161 — def test_the_sample_data_is_deterministic(self) -> None: # The templates are documentation; a figure that changes between runs # cannot be compared against the one in the docs.
- test_the_preview_data_is_deterministic_too · method · L163-L169 — def test_the_preview_data_is_deterministic_too(self) -> None
- PlotBuilderTests · class · L172-L216 — class PlotBuilderTests(FigureTestCase)
- setUp · method · L173-L175 — def setUp(self) -> None
- test_every_builder_draws_onto_the_axes_it_is_given · method · L177-L190 — def test_every_builder_draws_onto_the_axes_it_is_given(self) -> None
- test_every_builder_labels_its_axes · method · L192-L202 — def test_every_builder_labels_its_axes(self) -> None: # An unlabelled publication figure is a bug, not a style preference.
- test_builders_create_their_own_axes_when_none_is_supplied · method · L204-L210 — def test_builders_create_their_own_axes_when_none_is_supplied(self) -> None
- test_the_publication_style_applies_without_error · method · L212-L216 — def test_the_publication_style_applies_without_error(self) -> None
- CompositeFigureTests · class · L219-L232 — class CompositeFigureTests(FigureTestCase)
- test_the_comprehensive_figure_renders_and_saves · method · L220-L226 — def test_the_comprehensive_figure_renders_and_saves(self) -> None
- test_the_style_preview_renders · method · L228-L232 — def test_the_style_preview_renders(self) -> None