Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import unittest
class TestUniversityName(unittest.TestCase):
uni = {'nsu': 1, 'brac': 2}
shoppingMall = {1: 'Jamuna Future Park', 2: 'BCity'}
def test_is_it_an_university(self):
self.assertEqual(self.uni, {'nsu': 1, 'brac': 2})
# self.assertEqual(self.uni, {1: 'iub', 2: 'brac'}) # this will result in failure
def test_upper_case(self):
self.assertEqual('nsu'.upper(), 'NSU') # this might pass
self.assertEqual('north south university'.upper(), 'NORTH SOUTH UNIVERSITY') # this might pass too
def test_lower_case(self):
# self.assertEqual('nsu', 'brac') # this will fail for sure Lol
self.assertEqual('nsu', 'nsu') # this will fail for sure Lol
def test_nsu_established_year(self):
self.assertEqual('1992', '1992', "nice")
def test_nsu_position(self):
self.assertNotEqual(2, self.uni['nsu'])
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.