2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 17:32:55 +00:00
Files
python/pyste/tests/example_enumsUT.py
Bruno da Silva de Oliveira 29d537571b - Unit tests for the examples
[SVN r17987]
2003-03-19 02:47:29 +00:00

19 lines
449 B
Python

import unittest
from enums import *
class EnumsTest(unittest.TestCase):
def testIt(self):
self.assertEqual(int(color.Red), 0)
self.assertEqual(int(color.Blue), 1)
self.assertEqual(int(X.Choices.Good), 1)
self.assertEqual(int(X.Choices.Bad), 2)
x = X()
self.assertEqual(x.set(x.Choices.Good), 1)
self.assertEqual(x.set(x.Choices.Bad), 2)
if __name__ == '__main__':
unittest.main()