# Path: handroll/configuration.py
# class Configuration(object):
#     def __init__(self):
#     def domain(self):
#     def load_from_arguments(self, args):
#     def load_from_file(self, config_file):
#     def _find_extensions(self, parser):
# def build_config(config_file, args):
# 
# Path: handroll/exceptions.py
# class AbortError(Exception):
#     """Any fatal errors that would prevent handroll from proceeding should
#     signal with the ``AbortError`` exception."""


import inspect
import os
import tempfile
import unittest
from handroll import configuration
from handroll.exceptions import AbortError
            with_blog = BOOM!""")
        args = FakeArgs()
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))
        with self.assertRaises(AbortError):
            configuration.build_config(f.name, args)

    def test_no_domain_aborts(self):
        config = configuration.Configuration()
        with self.assertRaises(AbortError):
            config.domain

    def test_loads_domain_from_site(self):
        conf_file = inspect.cleandoc(
            """[site]
            domain = a_fake_domain""")
        args = FakeArgs()
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))

        config = configuration.build_config(f.name, args)

        self.assertEqual('a_fake_domain', config.domain)

    def test_converts_relative_paths(self):
        conf_file = inspect.cleandoc(
            """[site]
            outdir = ..""")
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))

# Path: handroll/configuration.py
# class Configuration(object):
#     def __init__(self):
#     def domain(self):
#     def load_from_arguments(self, args):
#     def load_from_file(self, config_file):
#     def _find_extensions(self, parser):
# def build_config(config_file, args):
# 
# Path: handroll/exceptions.py
# class AbortError(Exception):
#     """Any fatal errors that would prevent handroll from proceeding should
#     signal with the ``AbortError`` exception."""


# Path: handroll/tests/test_configuration.py
import inspect
import os
import tempfile
import unittest
from handroll import configuration
from handroll.exceptions import AbortError

            with_blog = BOOM!""")
        args = FakeArgs()
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))
        with self.assertRaises(AbortError):
            configuration.build_config(f.name, args)

    def test_no_domain_aborts(self):
        config = configuration.Configuration()
        with self.assertRaises(AbortError):
            config.domain

    def test_loads_domain_from_site(self):
        conf_file = inspect.cleandoc(
            """[site]
            domain = a_fake_domain""")
        args = FakeArgs()
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))

        config = configuration.build_config(f.name, args)

        self.assertEqual('a_fake_domain', config.domain)

    def test_converts_relative_paths(self):
        conf_file = inspect.cleandoc(
            """[site]
            outdir = ..""")
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(conf_file.encode('utf-8'))

        config = configuration.Configuration()