Closed alecpm closed 6 years ago
Merging #211 into master will increase coverage by
10.7%
. The diff coverage is40%
.
@@ Coverage Diff @@
## master #211 +/- ##
=========================================
+ Coverage 49% 59.6% +10.7%
=========================================
Files 7 7
Lines 1533 1537 +4
Branches 321 321
=========================================
+ Hits 750 916 +166
+ Misses 717 529 -188
- Partials 66 92 +26
I've separated out the fixtures you suggested, and factored out a TestGameLoops
class for game_loop
and send_state_thread
tests.
game_loop
will loop 3 times and send_state_thread
will loop 4 times because of the different way they do their variable checking. Gridworld.game_over
and Gridworld.game_started
will each return False 3 times before returning True.
I kind of hate writing loop_3x_exp
a whole bunch of times, just because it's kind of ugly, or having to rename it in each test, but it would be clearer.
I'm going to do a rebase anyway to get rid of this dumb patch coverage issue, so I'll do a rename along with that.
loops_3x
? :)
loop_exp_3x
which gets renamed to exp
in every test.
This branch adds some tests to Griduniverse. Currently they increase coverage from 48% to 62%. The new tests are mostly coverage oriented, rather than aimed at testing specific behaviors, and are a bit monolithic as a result. I expect they will be refactored to be more modular over time as functionality changes and is added which impacts the behavior of the tested methods.