def testIncludeConfigFile(self):
        class TestCfgFile(ConfigFile):
            bam = CfgBool
            biff = CfgBool

        dir = tempfile.mkdtemp()
        _home = os.getenv('HOME', '')
        try:
            open('%s/foo' % dir, 'w').write('inCLUDEconFIGFile bar\n'
                'includeCONFIGfile ~/baz\n')
            open('%s/bar' % dir, 'w').write('bam True\n')

            os.mkdir(os.path.join(dir, 'abode'))
            open('%s/abode/baz' % dir, 'w').write('biff True\n')
            os.environ['HOME'] = os.path.join(dir, 'abode')

            cfg = TestCfgFile()
            assert(not cfg.bam)
            cfg.read('%s/foo' % dir)
            assert(cfg.bam and cfg.biff)
        finally:
            os.environ['HOME'] = _home
            shutil.rmtree(dir)
dataset/ETHPy150Open sassoftware/conary/conary_test/libtest/cfgtest.py/ConfigTest.testIncludeConfigFile/original