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

Ensured 100% test coverage. #48

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Ensured 100% test coverage. #48

merged 2 commits into from
Jul 15, 2021

Conversation

Vlek
Copy link
Owner

@Vlek Vlek commented Jul 15, 2021

While working on coverage, some issues were resolved:

  1. Because of how the DiceParser object was being instantiated and used
    across multiple tests, the RollOption.Maximize was being used in more
    cases than it was supposed to. Once this was resolved, other tests
    showed that they did not have correct ranges. The output was reviewed
    and either the test was updated or the code was to accomodate
    expected results.
  2. Some operations were not being used and it became apparent by the
    coverage report. This was also the case for types that did not need
    to have their logic present in things like rmod where the mod
    method would handle the case instead.
  3. There are a few methods for objects that we will want to keep because
    they will be needed later on that are not current used. To make sure
    that our coverage is complete, I had to test these internal files
    instead of end-to-end testing. After we add the new features, we
    should re-evaluate these additions to consider whether they're
    actually needed. To do this, we should run pytest specifically
    against test_roll_dice.py or other scripts that do end-to-end
    testing only.

While working on coverage, some issues were resolved:
1) Because of how the DiceParser object was being instantiated and used
   across multiple tests, the RollOption.Maximize was being used in more
   cases than it was supposed to. Once this was resolved, other tests
   showed that they did not have correct ranges. The output was reviewed
   and either the test was updated or the code was to accomodate
   expected results.
2) Some operations were not being used and it became apparent by the
   coverage report. This was also the case for types that did not need
   to have their logic present in things like __rmod__ where the __mod__
   method would handle the case instead.
3) There are a few methods for objects that we will want to keep because
   they will be needed later on that are not current used. To make sure
   that our coverage is complete, I had to test these internal files
   instead of end-to-end testing. After we add the new features, we
   should re-evaluate these additions to consider whether they're
   actually needed. To do this, we should run pytest specifically
   against test_roll_dice.py or other scripts that do end-to-end
   testing only.
@Vlek Vlek added the testing Testing label Jul 15, 2021
@Vlek Vlek added this to the 3.0 milestone Jul 15, 2021
@Vlek Vlek self-assigned this Jul 15, 2021
Had to increment the python version due to the type notations that we
are using. The annotations are not available in 3.6 unfortunately.
@Vlek Vlek merged commit 44d156a into development Jul 15, 2021
@Vlek Vlek deleted the keep_notation branch July 15, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant