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

delete test.csv and test.json after the tests? #7

Open
epogrebnyak opened this issue Jan 13, 2021 · 0 comments
Open

delete test.csv and test.json after the tests? #7

epogrebnyak opened this issue Jan 13, 2021 · 0 comments
Assignees
Labels
project organization cleaning up / streamlining project structure

Comments

@epogrebnyak
Copy link
Contributor

def test_csv_io(self):
a = tm.TransitionMatrix()
a.to_csv("test.csv")
b = tm.TransitionMatrix(csv_file="test.csv")
self.assertAlmostEqual(a[0, 0], b[0, 0], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[0, 1], b[0, 1], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[1, 0], b[1, 0], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[1, 1], b[1, 1], places=ACCURATE_DIGITS, msg=None, delta=None)
def test_json_io(self):
a = tm.TransitionMatrix()
a.to_json("test.json")
b = tm.TransitionMatrix(json_file="test.json")
self.assertAlmostEqual(a[0, 0], b[0, 0], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[0, 1], b[0, 1], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[1, 0], b[1, 0], places=ACCURATE_DIGITS, msg=None, delta=None)
self.assertAlmostEqual(a[1, 1], b[1, 1], places=ACCURATE_DIGITS, msg=None, delta=None)

@open-risk open-risk added the project organization cleaning up / streamlining project structure label Jan 18, 2021
@open-risk open-risk self-assigned this Jan 18, 2021
@open-risk open-risk added this to the 0.5 PyPI Release milestone Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project organization cleaning up / streamlining project structure
Projects
None yet
Development

No branches or pull requests

2 participants