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

Wherever possible, prefer expect_identical() over expect_equal() #1712

Merged
merged 3 commits into from
Oct 15, 2022

Conversation

IndrajeetPatil
Copy link
Collaborator

No description provided.

@IndrajeetPatil IndrajeetPatil requested review from MichaelChirico and removed request for MichaelChirico October 14, 2022 20:45
@IndrajeetPatil IndrajeetPatil marked this pull request as draft October 14, 2022 20:48
@IndrajeetPatil IndrajeetPatil marked this pull request as ready for review October 14, 2022 20:53
@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2022

Codecov Report

Merging #1712 (9a53394) into main (a7a9340) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1712   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         104      104           
  Lines        4497     4497           
=======================================
  Hits         4442     4442           
  Misses         55       55           
Impacted Files Coverage Δ
R/methods.R 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

df,
exp
)
expect_equal(df, exp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's going on here? 🙃

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

df columns are not of integer type here:

── Failure (test-methods.R:74): as.data.frame.lints ────────────────────────────
`df` (`actual`) not identical to `exp` (`expected`).

`actual$line_number` is a double vector (1, 2)
`expected$line_number` is an integer vector (1, 2)

`actual$column_number` is a double vector (1, 6)
`expected$column_number` is an integer vector (1, 6)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was going to fix it in a different PR, but might as well do it here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I would have suggested just leaving the style fix for that other PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should I undo this here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it's fine, minor point here

@MichaelChirico MichaelChirico merged commit 6492032 into main Oct 15, 2022
@MichaelChirico MichaelChirico deleted the expect_identical_lint branch October 15, 2022 07:08
@MichaelChirico
Copy link
Collaborator

madman, you actually did it! 🤟🤟

IndrajeetPatil added a commit that referenced this pull request Oct 15, 2022
MichaelChirico pushed a commit that referenced this pull request Oct 15, 2022
@IndrajeetPatil IndrajeetPatil changed the title Get rid of expect_identical_linter() lints Wherever possible, prefer expect_identical() over expect_equal() Oct 15, 2022
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.

3 participants