bug fix on server side, add log engine, change lib to core

This commit is contained in:
citronneur
2014-07-20 14:59:53 +02:00
parent f51ef15865
commit 67845e50ad
31 changed files with 187 additions and 171 deletions

34
tests/const.py Normal file
View File

@@ -0,0 +1,34 @@
'''
@author: sylvain
'''
import unittest
import rdpy.base.const
import rdpy.network.type
class ConstCase(unittest.TestCase):
'''
represent test case for all classes and function
present in rdpy.base.const
'''
def test_type_attributes(self):
'''
test if type attributes decorator works
'''
@rdpy.base.const.TypeAttributes(rdpy.network.type.UInt16Le)
class Test:
MEMBER_1 = 1
MEMBER_2 = 2
self.assertIsInstance(Test.MEMBER_1, rdpy.network.type.UInt16Le, "MEMBER_1 is not in correct type")
self.assertIsInstance(Test.MEMBER_2, rdpy.network.type.UInt16Le, "MEMBER_2 is not in correct type")
def test_const(self):
'''
test if get on const class member generate new object each
'''
@rdpy.base.const.ConstAttributes
class Test:
MEMBER_1 = 1
MEMBER_2 = 2
self.assertEquals(Test.MEMBER_1, Test.MEMBER_1, "handle same type of object")