# Path: django_make_app/io_utils.py
# def read_yaml_file(filename):
#     with io.open(filename, mode='r', encoding='utf-8') as the_file:
#         return yaml.safe_load(the_file)
# 
# def optimize_code(filename):
#     SortImports(filename)
#     FormatFile(filename, in_place=True, style_config='{based_on_style: pep8, column_limit: 255}')


import io
import os
import tempfile
from unittest import TestCase
from django_make_app.io_utils import read_yaml_file, optimize_code
# -*- encoding: utf-8 -*-
# ! python2

from __future__ import (absolute_import, division, print_function, unicode_literals)




class IOUtilsTestCase(TestCase):
    def test_read_yaml_file(self):
        try:
            with tempfile.NamedTemporaryFile(mode='w', delete=False) as temp:
                temp.write("language: python")


# Path: django_make_app/io_utils.py
# def read_yaml_file(filename):
#     with io.open(filename, mode='r', encoding='utf-8') as the_file:
#         return yaml.safe_load(the_file)
# 
# def optimize_code(filename):
#     SortImports(filename)
#     FormatFile(filename, in_place=True, style_config='{based_on_style: pep8, column_limit: 255}')


# Path: tests/test_io_utils.py
import io
import os
import tempfile
from unittest import TestCase
from django_make_app.io_utils import read_yaml_file, optimize_code

# -*- encoding: utf-8 -*-
# ! python2

from __future__ import (absolute_import, division, print_function, unicode_literals)




class IOUtilsTestCase(TestCase):
    def test_read_yaml_file(self):
        try:
            with tempfile.NamedTemporaryFile(mode='w', delete=False) as temp:
                temp.write("language: python")


            parsed_yaml = read_yaml_file(temp.name)