question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to update snapshots with unittest?

See original GitHub issue

Appending --update-snapshot as is done with nosetest, etc throws ImportError: No module named --update-snapshot. The docs are unclear how exactly to pass this param when using unittest. Is this features supported when using unittest?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

1reaction
davidshepherd7commented, Sep 30, 2020

I added an environment variable option to #112 so that it doesn’t make things worse for unittest users.

I think it would be better if someone who uses and understands unittest added a main override if we decide we do want one.

1reaction
paulmelnikowcommented, Sep 30, 2020

An alternative could be to set it in an environment variable. What do you think about that approach?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snapshot Testing - Jest
Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
Read more >
Jest: How to Update Snapshot Tests - In Plain English
Run the snapshot test, make sure it passes — if it does not pass, find the problem and fix it, don't change the...
Read more >
How to update snapshot with Jest and vue-cli - Stack Overflow
npx vue-cli-service test:unit -u. This will run the tests and upgrade the snapshots. ... npx lerna run test:update:snapshot.
Read more >
Creating snapshots in Jest for testing React applications
Learn how to create snapshots in Jest for testing React ... Select the u option to update the snapshot when Jest is in...
Read more >
snapshottest · PyPI
If you want to update the snapshots automatically you can use the nosetests --snapshot-update . Check the Unittest example.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found