Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo watch test as a vector of lines instead of a string. #411

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

alysbrooks
Copy link
Member

This test is difficult to work with as-is because it's one big string, and deep-diff2 (currently) shows only that two strings differ, and not the substrings in particular that cause the mismatch.

@codecov
Copy link

codecov bot commented May 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (043308e) 75.08% compared to head (0e9a7e3) 75.08%.
Report is 7 commits behind head on main.

❗ Current head 0e9a7e3 differs from pull request most recent head 99f96f5. Consider uploading reports for the commit 99f96f5 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #411   +/-   ##
=======================================
  Coverage   75.08%   75.08%           
=======================================
  Files          52       52           
  Lines        2802     2802           
  Branches      289      289           
=======================================
  Hits         2104     2104           
  Misses        511      511           
  Partials      187      187           
Flag Coverage Δ
integration 56.31% <ø> (ø)
unit 69.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This test is difficult to work with as-is because it's one big string,
and deep-diff2 (currently) shows only that two strings differ, and not
the substrings in particular that cause the mismatch.
@alysbrooks alysbrooks force-pushed the alys/improve-watch-test branch from 48bedb0 to acf8fb7 Compare May 22, 2023 20:39
It seems to run into quadratic behavior if I try to compare every line.

This is slightly less accurate of a test, though.
Artificially dividing it up produced weird errors when there was a
mismach. Using equals results in more coherent diffs and only required
adding a few lines.

I also didn't have that much confidence that a different change in test
output wouidn't trigger a long delay.

This does make the test slightly more fragile, as any thing added to the
beginning of the output or the end of the output will cause this to
fail.

Also, if there's more lines in the output than in the test, you don't
get a great diff either.
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.

1 participant