Skip to content

Fix broken examples#753

Merged
samuelcolvin merged 2 commits intopydantic:masterfrom
dmontagu:test-examples
Aug 17, 2019
Merged

Fix broken examples#753
samuelcolvin merged 2 commits intopydantic:masterfrom
dmontagu:test-examples

Conversation

@dmontagu
Copy link
Copy Markdown
Contributor

@dmontagu dmontagu commented Aug 16, 2019

Change Summary

Fixes a handful of broken examples in the docs, and adds a make recipe test-examples that can be used to identify which examples are broken.

Some of them explicitly claim they will error, so I didn't set up any sort of pass/fail test, and didn't add the recipe to any of the CI or similar. But at least with this recipe you can quickly get a list of the failures and confirm there are no surprises.

I suppose we could add validation that the failures are the exact files we expect, but I figured I'd keep this change small.

Checklist

  • Unit tests for the changes exist
    N/A ?

  • Tests pass on CI and coverage remains at 100%

  • Documentation reflects the changes where applicable

  • changes/<pull request or issue id>-<github username>.rst file added describing change
    (see changes/README.md for details)

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 16, 2019

Codecov Report

Merging #753 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #753   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines        2723   2723           
  Branches      536    536           
=====================================
  Hits         2723   2723

@samuelcolvin samuelcolvin merged commit 27bb336 into pydantic:master Aug 17, 2019
@samuelcolvin
Copy link
Copy Markdown
Member

thanks, as you say I think we should run all example scripts in CI.

The simplest way of denoting if they should fail would be either to include --ValidationError indicating the error they should fail with in the file name. There are a few other options, but that seems simplest.

alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants