# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pygram.py
# _GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")
# _PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__),
#                                      "PatternGrammar.txt")
# class Symbols(object):
#     def __init__(self, grammar):
# 
# Path: py3kwarn2to3/fixer_base.py
# class BaseFix(object):
# class ConditionalFix(BaseFix):
#     PATTERN = None  # Most subclasses should override with a string literal
#             PC = PatternCompiler()
#     def __init__(self, options, log):
#     def compile_pattern(self):
#     def set_filename(self, filename):
#     def match(self, node):
#     def transform(self, node, results):
#     def new_name(self, template=u"xxx_todo_changeme"):
#     def log_message(self, message):
#     def cannot_convert(self, node, reason=None):
#     def warning(self, node, reason):
#     def start_tree(self, tree, filename):
#     def finish_tree(self, tree, filename):
#     def start_tree(self, *args):
#     def should_skip(self, node):


import sys
import os
import codecs
import tempfile
import shutil
    import unittest2 as unittest
    import unittest
    from StringIO import StringIO
    from io import StringIO
from py3kwarn2to3 import refactor, pygram, fixer_base
from py3kwarn2to3.pgen2 import token
        from myfixes.fix_first import FixFirst
        from myfixes.fix_last import FixLast
        from myfixes.fix_parrot import FixParrot
        from myfixes.fix_preorder import FixPreorder
        from myfixes.fix_explicit import FixExplicit
"""
Unit tests for refactor.py.
"""

from __future__ import with_statement


try:
except:


if sys.version_info < (2, 7):
else:



TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
FIXER_DIR = os.path.join(TEST_DATA_DIR, "fixers")

sys.path.append(FIXER_DIR)
try:

# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pygram.py
# _GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")
# _PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__),
#                                      "PatternGrammar.txt")
# class Symbols(object):
#     def __init__(self, grammar):
# 
# Path: py3kwarn2to3/fixer_base.py
# class BaseFix(object):
# class ConditionalFix(BaseFix):
#     PATTERN = None  # Most subclasses should override with a string literal
#             PC = PatternCompiler()
#     def __init__(self, options, log):
#     def compile_pattern(self):
#     def set_filename(self, filename):
#     def match(self, node):
#     def transform(self, node, results):
#     def new_name(self, template=u"xxx_todo_changeme"):
#     def log_message(self, message):
#     def cannot_convert(self, node, reason=None):
#     def warning(self, node, reason):
#     def start_tree(self, tree, filename):
#     def finish_tree(self, tree, filename):
#     def start_tree(self, *args):
#     def should_skip(self, node):


# Path: py3kwarn2to3/tests/test_refactor.py
import sys
import os
import codecs
import tempfile
import shutil
    import unittest2 as unittest
    import unittest
    from StringIO import StringIO
    from io import StringIO
from py3kwarn2to3 import refactor, pygram, fixer_base
from py3kwarn2to3.pgen2 import token
        from myfixes.fix_first import FixFirst
        from myfixes.fix_last import FixLast
        from myfixes.fix_parrot import FixParrot
        from myfixes.fix_preorder import FixPreorder
        from myfixes.fix_explicit import FixExplicit

"""
Unit tests for refactor.py.
"""

from __future__ import with_statement


try:
except:


if sys.version_info < (2, 7):
else:



TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
FIXER_DIR = os.path.join(TEST_DATA_DIR, "fixers")

sys.path.append(FIXER_DIR)
try:

    _DEFAULT_FIXERS = refactor.get_fixers_from_package("myfixes")