def test_config_with_non_package_relative_import(self):
        from pecan import configuration
        with tempfile.NamedTemporaryFile('wb', suffix='.py') as f:
            f.write(b_('\n'.join(['from . import variables'])))
            f.flush()
            configuration.Config({})

            try:
                configuration.conf_from_file(f.name)
            except (__HOLE__, SystemError) as e:
                assert 'relative import' in str(e)
            else:
                raise AssertionError(
                    "A relative import-related error should have been raised"
                )
dataset/ETHPy150Open pecan/pecan/pecan/tests/test_conf.py/TestConf.test_config_with_non_package_relative_import