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

Idea for enhancing e2e coverage testing #482

Open
ferdnyc opened this issue Sep 27, 2024 · 1 comment
Open

Idea for enhancing e2e coverage testing #482

ferdnyc opened this issue Sep 27, 2024 · 1 comment

Comments

@ferdnyc
Copy link
Contributor

ferdnyc commented Sep 27, 2024

(Originally posted in #466. Moved here so I don't lose track of it once the source PR is merged.)

I was thinking of submitting a (separate) PR that adds an actual code modification to the e2e tests, so that we could get a look at the diff coverage reporting as well. That's the part, if anything, that I think might need adjusting with branch coverage enabled.

(I figured I'd drop the test-ed function to just contain

def f(a="", b="", c="", d=""):
      elements = []
      if a:
          elements.append(a)
      if b:
          elements.append(b)
      """__ADD_CODE_HERE__"""
      return "-".join(elements)

...And then have the e2e test function insert the if c: and if d: blocks. (Or maybe even if c: ... elif d: which might make for better branch coverage testing.)

@ewjoachim
Copy link
Member

And as mentioned in #466, this seems like an excellent idea !

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

No branches or pull requests

2 participants