def test_feature_configs_does_not_mutate_default_features(self): odl_features.deinit() self.assertEqual(odl_features.EMPTY_FEATURES, odl_features.feature_configs) odl_features.feature_configs['test'] = True self.assertNotEqual(odl_features.EMPTY_FEATURES, odl_features.feature_configs)
def test_deinit_does_not_mutate_default_features(self): # we call it before initing anything, to force the reassignment # of the global features variable. odl_features.deinit() odl_features.feature_configs['test'] = True self.assertNotEqual(odl_features.EMPTY_FEATURES, odl_features.feature_configs) # now we do it again, to make sure that it assigns it to default # values odl_features.deinit() self.assertEqual(odl_features.EMPTY_FEATURES, odl_features.feature_configs)
def test_deinit_resets_to_default_features(self): odl_features.deinit() self.assertEqual(odl_features.feature_configs, odl_features.EMPTY_FEATURES)