Skip to content

Conversation

@treyhunner
Copy link
Member

  • Explain how to measure code coverage
  • Write more code that isn't tested (which will lower code coverage)
  • Increase code coverage again
  • Explain branch coverage and .coveragerc
  • Add gravatar images to comments as an example?

Related to issue #36.

@treyhunner
Copy link
Member Author

Added some more details to this one.

@treyhunner treyhunner added this to the v2.0: Workshop Part 2 milestone Feb 25, 2014
Copy link
Contributor

Choose a reason for hiding this comment

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

See http://nedbatchelder.com/code/coverage/branch.html
for a good example:

def my_partial_fn(x):       # line 1
    if x:                   #      2
        y = 10              #      3
    return y                #      4

my_partial_fn(1)

This directory should not be stored under version control.  It is a
directory of meta content generated based on our code so it would be
listed in a .gitignore in a real project.
@treyhunner
Copy link
Member Author

I have made a lot of progress the first part of this extra tutorial. Anyone want to give it a look?

I'll be working on the second part of the tutorial tomorrow.

@willingc
Copy link
Member

willingc commented Mar 7, 2014

Hoping that my brain is more engaged this morning and that I pushed to the right place vs. the crazy pull of last night. If I messed up again, I'm missing a workflow nuance :)

@treyhunner
Copy link
Member Author

@willingc ah I didn't realize your pull request included this one.

The changes look great. I like the shortened explanations. I made a couple more changes on top of yours.

Now we just need to decide on how/whether the Gravatar tutorial will work. I can pull that out and make that part of a separate pull request if that makes more sense.

@willingc
Copy link
Member

willingc commented Mar 8, 2014

@treyhunner Thanks for cleaning up the formatting.

It might be best to create a new branch for the gravatar tutorial.

The gravatar tutorial could add the gravatar code (which you have mostly done); have the user run coverage to see that the coverage decreases; then add tests; run coverage again to see that coverage increases. That would cover the open tasks for this issue within the gravatar tutorial :)

@treyhunner
Copy link
Member Author

@willingc I removed the gravatar tutorial.

I think this may be ready for merging now.

@treyhunner treyhunner merged commit e0a8bc3 into master Mar 11, 2014
@treyhunner treyhunner deleted the the-testing-game branch March 11, 2014 02:05
@treyhunner
Copy link
Member Author

Merged the testing game tutorial after wrestling with some very odd merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants