Skip to content

Add test coverage that default_factory doesn't copy its value#1523

Merged
samuelcolvin merged 1 commit intopydantic:masterfrom
therefromhere:test_singleton
May 31, 2020
Merged

Add test coverage that default_factory doesn't copy its value#1523
samuelcolvin merged 1 commit intopydantic:masterfrom
therefromhere:test_singleton

Conversation

@therefromhere
Copy link
Copy Markdown
Contributor

@therefromhere therefromhere commented May 17, 2020

Change Summary

Adds an assertion that default_factory can be used to return a singleton.

Related issue number

Resolves #1489

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2020

Codecov Report

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

@@            Coverage Diff            @@
##            master     #1523   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3761      3761           
  Branches       748       748           
=========================================
  Hits          3761      3761           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5067508...9f030d6. Read the comment docs.

@therefromhere
Copy link
Copy Markdown
Contributor Author

Test failure seems to be a codecov.io connection problem.

@samuelcolvin samuelcolvin merged commit 827388b into pydantic:master May 31, 2020
@samuelcolvin
Copy link
Copy Markdown
Member

thank you.

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.

default_factory's result doesn't get deepcopy'd - bug or feature?

2 participants