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

#5 Move completely from unittest to pytest. #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Anu9518
Copy link

@Anu9518 Anu9518 commented Oct 24, 2020

type: Refactor
subject: Chang unittest to pytest

Copy link
Owner

@nikochiko nikochiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why Travis isn't running on this PR. But anyway, what I had in mind was tests like these -> https://github.com/nikochiko/df-wizard-chess/blob/master/tests/test_utils.py#L63-L85 (the whole file). When we use unittest, and subclass our test classes to unittest.TestCase, we're allowed to have a setup class, a tear down class and self.assertEqual or self.assert{some_condition}. The format is a bit different with pytest, and since we don't subclass it to any other classes, we have to use python's inbuilt assert statements. You can refer this -> https://www.jitsejan.com/moving-from-unittest-to-pytest.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants