Created
July 27, 2018 14:34
-
-
Save VladimirSaz/69071f6f5c3ca4f90692e16d401e3251 to your computer and use it in GitHub Desktop.
Unit test Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import sys | |
sys.path.append('PATH') # noqa | |
from module_name import Module_name | |
from test_tools import test_name | |
from pprint import pprint #noqa | |
class TestUM(unittest.TestCase): | |
def setUp(self): | |
pass | |
@test_name("test_") | |
def test_select_by(self): | |
# Arrange | |
# Act | |
result_data = self.module.do_smth() | |
expected_data = 1 | |
# Assert | |
self.assertEqual(expected_data, result_data) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment