/examples/libtest/VarsTest.py
Python | 16 lines | 13 code | 3 blank | 0 comment | 2 complexity | dde433664d1fdb02892cef08c515ac42 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
- from UnitTest import UnitTest
-
- class VarsTest(UnitTest):
- def __init__(self):
- UnitTest.__init__(self)
-
- def getName(self):
- return "Vars"
-
- def testChangeVarInInnerScope(self):
- x = 5
- if x == 1:
- x = 2
- elif x == 5:
- x = 3
- self.assertEqual(x, 3, "the value of x should be 3")