Skip to content

Instantly share code, notes, and snippets.

@VladimirSaz
Created July 27, 2018 14:34
Show Gist options
  • Save VladimirSaz/69071f6f5c3ca4f90692e16d401e3251 to your computer and use it in GitHub Desktop.
Save VladimirSaz/69071f6f5c3ca4f90692e16d401e3251 to your computer and use it in GitHub Desktop.
Unit test Python
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