<s> """<STR_LIT>""" <EOL> import unittest <EOL> from dfvfs . resolver import resolver <EOL> from tests . resolver import test_lib <EOL> class ResolverTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def testHelperRegistration ( self ) : <EOL> """<STR_LIT>""" <EOL> number_of_resolver_helpers = len ( resolver . Resolver . _resolver_helpers ) <EOL> resolver . Resolver . RegisterHelper ( test_lib . TestResolverHelper ) <EOL> self . assertEqual ( <EOL> len ( resolver . Resolver . _resolver_helpers ) , <EOL> number_of_resolver_helpers + <NUM_LIT:1> ) <EOL> with self . assertRaises ( KeyError ) : <EOL> resolver . Resolver . RegisterHelper ( test_lib . TestResolverHelper ) <EOL> resolver . Resolver . DeregisterHelper ( test_lib . TestResolverHelper ) <EOL> self . assertEqual ( <EOL> len ( resolver . Resolver . _resolver_helpers ) , number_of_resolver_helpers ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
