<s> import copy <EOL> import unittest2 as unittest <EOL> from giftwrap . builders import Builder , BUILDER_DRIVER_NAMESPACE <EOL> from stevedore import extension <EOL> BASE_DRIVERS = set ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> class TestBuilder ( unittest . TestCase ) : <EOL> def test_default_drivers ( self ) : <EOL> drivers = set ( Builder . builder_names ( ) ) <EOL> self . assertEqual ( drivers , BASE_DRIVERS ) <EOL> def test_additional_drivers ( self ) : <EOL> em = extension . ExtensionManager ( BUILDER_DRIVER_NAMESPACE ) <EOL> em . extensions . append ( extension . Extension ( '<STR_LIT:test>' , None , None , None ) ) <EOL> drivers = set ( Builder . builder_names ( em ) ) <EOL> base_drivers = copy . copy ( BASE_DRIVERS ) <EOL> base_drivers . add ( '<STR_LIT:test>' ) <EOL> self . assertEqual ( drivers , base_drivers ) </s>
