-
Notifications
You must be signed in to change notification settings - Fork 203
stats.add_battle tests #331
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
Conversation
Add ci.yml and add_xp tests
Add bank_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there, this is really cool since I normaly don't really come around to testing a whole lot.
@@ -0,0 +1,12 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recomment not to commit IDE configurations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! I apologize for the mess here, it was my sleepy error. I am working with a group of fellow Penn State grad students on a project where we were asked to find an open source project to analyze and produce some tests for. We settled on Pokete as an interesting option and what you're seeing was my inadvertently misdirected PR from our fork for the purposes of the assignment (I did not look closely enough at which repository and branch the PR was being created for in the GitHub interface). We discussed from the get-go that we'd like to contribute back to your project, but this PR should not have been the one to do so (as you have already seen, it contains things like our vs code config, etc.) I would love to replace this one with a another, along with some other suggested updates we came across. I for one, have really enjoyed diving into your game
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I feel really flattered and I'm glad to hear that.
Sure, just submit another PR later.
@@ -61,6 +61,9 @@ def __init__( | |||
self.night_active = self.inf.night_active | |||
self.enem = None | |||
self.oldhp = 0 | |||
# don't allow pokete with negative xp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be changed to an assertion like in bank
mock_get_terminal_size.return_value = (140, 40) | ||
from pokete.figure.bank import Bank | ||
|
||
class bank_test(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class bank_test(unittest.TestCase): | |
class BankTest(unittest.TestCase): |
Like in the other test files class naming should be in upper camel case and method naming in snake case.
@@ -0,0 +1,111 @@ | |||
import unittest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you moved this from semantic_version.py maybe the old file should be removed.
from .poke_graph_test import * | ||
from .poke_test import * | ||
from .bank_test import * | ||
from .stats import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tests fail due to this, this should rather be .battle_graph_test
- Adds 2 new test files for the stats add_battle method, representing graph-based as well as input-partitioning approaches. - two test cases in battle_test fail as the truthy value of non boolean input values results in unintuitive output
tests(stats): add new add_battle tests
graph-based as well as input-partitioning approaches.
boolean input values results in unintuitive output