#NEWLINE# @ bacpypes_debugging #NEWLINE# def unsigned_endec( v , x ) : #NEWLINE# #INDENT# 'Pass the value to Unsigned, construct a tag from the hex string,\n    and compare results of encode and decoding each other.' #NEWLINE# if _debug : #NEWLINE# #INDENT# unsigned_endec . _debug ( 'unsigned_endec %r %r' , v , x ) #NEWLINE# #UNINDENT# tag = unsigned_tag ( x ) #NEWLINE# if _debug : #NEWLINE# #INDENT# unsigned_endec . _debug ( '    - tag: %r, %r' , tag , tag . tagData ) #NEWLINE# #UNINDENT# obj = Unsigned ( v ) #NEWLINE# if _debug : #NEWLINE# #INDENT# unsigned_endec . _debug ( '    - obj: %r, %r' , obj , x . value ) #NEWLINE# #UNINDENT# assert ( unsigned_encode ( obj ) == tag ) #NEWLINE# assert ( unsigned_decode ( tag ) == obj )