예제 #1
0
    def config(self, dir_test):
        """
        Sets up the config for the converters.

        1. Changes the current working directory the the `dir_test` repository
        2. Reads in the edit file in the repository
        3. Initializes a traitlets config object
        4. Sets the `source_notebook` config
        5. Sets the `inline` configs
        6. Returns the config object
        """
        cwd = os.getcwd()
        os.chdir(dir_test)
        nb = self.read_nb(self.edit_file())
        c = Config()
        c.source_notebook = nb
        c.inline = Config()
        c.inline.enabled = False
        c.inline.solution = False
        os.chdir(cwd)
        return c