<s> try : <EOL> from imp import reload <EOL> except ImportError : <EOL> pass <EOL> import unittest <EOL> import logging <EOL> from nose . tools import eq_ <EOL> LOG = logging . getLogger ( '<STR_LIT>' ) <EOL> class TestOfprotCommon ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_ofp_event ( self ) : <EOL> import ryu . ofproto <EOL> reload ( ryu . ofproto ) <EOL> import ryu . controller . ofp_event <EOL> reload ( ryu . controller . ofp_event ) <EOL> def test_ofproto ( self ) : <EOL> import ryu . ofproto <EOL> reload ( ryu . ofproto ) <EOL> ofp_modules = ryu . ofproto . get_ofp_modules ( ) <EOL> import ryu . ofproto . ofproto_v1_0 <EOL> import ryu . ofproto . ofproto_v1_2 <EOL> import ryu . ofproto . ofproto_v1_3 <EOL> import ryu . ofproto . ofproto_v1_4 <EOL> import ryu . ofproto . ofproto_v1_5 <EOL> eq_ ( set ( ofp_modules . keys ( ) ) , set ( [ ryu . ofproto . ofproto_v1_0 . OFP_VERSION , <EOL> ryu . ofproto . ofproto_v1_2 . OFP_VERSION , <EOL> ryu . ofproto . ofproto_v1_3 . OFP_VERSION , <EOL> ryu . ofproto . ofproto_v1_4 . OFP_VERSION , <EOL> ryu . ofproto . ofproto_v1_5 . OFP_VERSION , <EOL> ] ) ) <EOL> consts_mods = set ( [ ofp_mod [ <NUM_LIT:0> ] for ofp_mod in ofp_modules . values ( ) ] ) <EOL> eq_ ( consts_mods , set ( [ ryu . ofproto . ofproto_v1_0 , <EOL> ryu . ofproto . ofproto_v1_2 , <EOL> ryu . ofproto . ofproto_v1_3 , <EOL> ryu . ofproto . ofproto_v1_4 , <EOL> ryu . ofproto . ofproto_v1_5 , <EOL> ] ) ) <EOL> parser_mods = set ( [ ofp_mod [ <NUM_LIT:1> ] for ofp_mod in ofp_modules . values ( ) ] ) <EOL> import ryu . ofproto . ofproto_v1_0_parser <EOL> import ryu . ofproto . ofproto_v1_2_parser <EOL> import ryu . ofproto . ofproto_v1_3_parser <EOL> import ryu . ofproto . ofproto_v1_4_parser <EOL> import ryu . ofproto . ofproto_v1_5_parser <EOL> eq_ ( parser_mods , set ( [ ryu . ofproto . ofproto_v1_0_parser , <EOL> ryu . ofproto . ofproto_v1_2_parser , <EOL> ryu . ofproto . ofproto_v1_3_parser , <EOL> ryu . ofproto . ofproto_v1_4_parser , <EOL> ryu . ofproto . ofproto_v1_5_parser , <EOL> ] ) ) </s>
