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

Feat/212 custom matchers for testing #219

Merged

Conversation

eruizalo
Copy link
Collaborator

Description

Custom matchers for testing Doric expected errors

Related Issue

#212

Motivation and Context

This change simplifies internal testing. It also tests like "normal" spark behaviour.

How Has This Been Tested?

  • This pull request contains appropriate tests?: YES

@eruizalo
Copy link
Collaborator Author

With the new changes we may found the following scenarios:

2 errors => 1 ok, 1 ko

image

2 errors => 2 ko

image

1 error ko

image

expected and actual number of errors does not match

image

@eruizalo eruizalo force-pushed the feat/212-custom-matchers-for-testing branch 2 times, most recently from fe89c2e to 37c8fdb Compare May 29, 2022 17:38
@eruizalo eruizalo added enhancement New feature or request spark_3.0 PR changes to spark 3.0 spark_3.1 PR changes to spark 3.1 spark_3.2 PR changes to spark 3.2 spark_2.4 PR changes to spark 2.4 labels May 29, 2022
@codecov
Copy link

codecov bot commented May 29, 2022

Codecov Report

Merging #219 (26ef2c6) into main (dc213ed) will increase coverage by 0.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   96.00%   96.45%   +0.44%     
==========================================
  Files          53       53              
  Lines         801      816      +15     
  Branches       11       10       -1     
==========================================
+ Hits          769      787      +18     
+ Misses         32       29       -3     
Flag Coverage Δ
spark-2.4.x 93.63% <100.00%> (+0.52%) ⬆️
spark-3.0.x 95.23% <100.00%> (+0.44%) ⬆️
spark-3.1.x 96.37% <100.00%> (+0.42%) ⬆️
spark-3.2.x 96.37% <100.00%> (+0.42%) ⬆️

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

Impacted Files Coverage Δ
core/src/main/scala/doric/sem/Errors.scala 95.35% <100.00%> (+13.21%) ⬆️
core/src/main/scala/doric/syntax/TypeMatcher.scala 100.00% <100.00%> (ø)

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 dc213ed...26ef2c6. Read the comment docs.

@eruizalo eruizalo force-pushed the feat/212-custom-matchers-for-testing branch from 37c8fdb to fe8fd1c Compare May 29, 2022 22:28
@github-actions github-actions bot removed spark_3.2 PR changes to spark 3.2 spark_3.1 PR changes to spark 3.1 spark_3.0 PR changes to spark 3.0 spark_2.4 PR changes to spark 2.4 labels May 29, 2022
@github-actions github-actions bot added spark_2.4 PR changes to spark 2.4 spark_3.0 PR changes to spark 3.0 spark_3.1 PR changes to spark 3.1 spark_3.2 PR changes to spark 3.2 labels Jun 2, 2022
@eruizalo eruizalo force-pushed the feat/212-custom-matchers-for-testing branch from 11983c7 to c8cf00e Compare June 2, 2022 16:54
@eruizalo eruizalo linked an issue Jun 6, 2022 that may be closed by this pull request
@eruizalo eruizalo force-pushed the feat/212-custom-matchers-for-testing branch from e1be01f to 26ef2c6 Compare June 6, 2022 21:56
@eruizalo eruizalo marked this pull request as ready for review June 6, 2022 22:01
@eruizalo eruizalo requested a review from a team as a code owner June 6, 2022 22:01
Copy link
Member

@jserranohidalgo jserranohidalgo left a comment

Choose a reason for hiding this comment

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

LGTM!
great job 👍

@alfonsorr alfonsorr merged commit 8ebb166 into hablapps:main Jun 8, 2022
@eruizalo eruizalo deleted the feat/212-custom-matchers-for-testing branch June 17, 2022 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spark_2.4 PR changes to spark 2.4 spark_3.0 PR changes to spark 3.0 spark_3.1 PR changes to spark 3.1 spark_3.2 PR changes to spark 3.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom matchers for testing
3 participants