

def test_env_replacement(self):
    config = Configuration({
        'replace': 'prefix_$(env.FOO_BAR)_suffix',
        'type_conversion': 'prefix_$(env.FOURTYTWO)',
        'keep_int': '$(env.FOURTYTWO)',
        'keep_dict': '$(env.DICT)',
        'no_parens': '$env.FOO_BAR',
        'no_namespace': '$(FOO_BAR)',
        'nested': '$(var.nested.foo)',
        'dashes': '$(var.dashed-name)',
    }, env={
        'FOO_BAR': '42',
        'FOURTYTWO': 42,
        'DICT': {
            
        },
    }, var=Configuration({
        'dashed-name': True,
        'nested': {
            'foo': 1764,
        },
    }))
    self.assertEqual(config.get('replace'), 'prefix_42_suffix')
    self.assertEqual(self.get('type_conversion'), 'prefix_42')
    self.assertEqual(config.get('keep_int'), 42)
    self.assertEqual(config.get('keep_dict'), {
        
    })
    self.assertEqual(config.get('no_parens'), '$env.FOO_BAR')
    self.assertEqual(config.get('no_namespace'), '$(FOO_BAR)')
    self.assertEqual(config.get('nested'), 1764)
    self.assertEqual(config.get('dashes'), True)

dataset/ETHPy150Open deliveryhero/lymph/lymph/tests/test_config.py ConfigurationTests.test_env_replacement/VarMisuse@127/251 `config`->`self`