Closed ichabod801 closed 4 years ago
Ouch. 26 failures, 251 errors on the first run. It looks like card related issues. Didn't I fix the tests after making those modifications? I'm afraid that I didn't.
All righty then. Go through them one test file at a time.
Fixed backgammon.py, which had over 85 errors, so that's a good chunk of them.
Now I remember why the tests are all messed up. I didn't check the unit tests after v0.50.51a1 because I knew there was a play test release (this release) coming after it. I figured I could deal with it during the play test release. Well, here I am, dealing with it.
The last problem with Battleships is that bots return coordinates from ask, and humans return strings. This makes it impossible to have tournament, because the human becomes a bot returning the wrong thing.
The Battleships unit tests are fixed, removing 21 failures and 14 errors.
All the unit tests through crazy_eights_test.py have no failures or errors.
Finished with cribbage_test.py, which removes 45 errors.
Finished through game_test.py, which removes 5 errors.
Cleaning up gin_rummy_test.py removes 5 failures and 5 errors.
Currently in interface_test.py, I'm getting intermittent errors, one to three per run. These are in the interface command test, with invalid replies in AutoBot.ask_yes_no. I think when I wrote this I didn't know what questions to expect, so I just kept throwing things at the interface until something worked. Perhaps try making AutoBot.ask_yes_no more forgiving somehow.
Everything up through player_test.py tests out fine. However, prisoner_test.py has 73 errors. It looks like the calls to the bots are all flawed because of the way I rewrote them.
I made one minor change to prisoner_game.py while fixing prisoner_test.py: I made sure all the bots used the full 'cooperate' or 'defect' as moves, not just 'c' and 'd'. This actually only applied to the GradualBot. It's also invisible to the user.
All tests now run without error or failure in 3.6.
I'm getting two errors in 2.7 in interface_test.py. Both are when getting statistics for a game using an alias. However, they only occur when I run _test_all.py and not when I run interface_test.py. Also, getting stats by alias works fine in the interface in 2.7. I have no idea what the problem is, but it's a problem with unittest, so I'm going to ignore it.
I've made a lot of changes. Make sure I didn't mess up any of the unit tests.