# Path: opentaxforms/ut.py
# NL = '\n'
# TAB = '\t'
# def merge(bb1, bb2):
# def numerify(s):
# def compactify(multilineRegex):
#     def crunch(seg):
# def pickle(data, pickleFilePrefix):
# def unpickle(pickleFilePrefix, default=None):
# def flattened(l):
# def hasdups(l, key=None):
# def uniqify(l):
# def uniqify2(l):
# def setupLogging(loggerId, args=None):
# def unsetupLogging():
# def logg(msg, outputs=None):
# def jj(*args, **kw):
# def jdb(*args, **kw):
# def run0(cmd):
# def run(cmd, logprefix='run', loglevel='INFO'):
#     def __init__(self, pkgname, fpath=None):
#     def path(self):
#     def content(self):
#     def keys(cls):
#     def vals(cls):
#     def items(cls):
#     def __init__(self):
#     def __call__(self, **kw):
#     def __init__(self, *maps, **kw):
#     def _getGetitems(self, mapp):
#     def __getitem__(self, key):
#     def __setitem__(self, key, val):
#     def __len__(self):
#     def __call__(self, *keys):
#     def clear(self):
#     def update(self, *maps):
#     def __add__(self, *maps):
#     def __iadd__(self, *maps):
#     def __iter__(self):
#     def iterkeys(self):
#     def keys(self):
#     def values(self):
#     def items(self):
#     def iteritems(self):
#     def get(self, key, dflt=None):
#     def __str__(self):
#     def __repr__(self):
# def notequalpatch(self, o):
#     def fromstring(cls, s):
#     def __hash__(self):
# def playQnty():
# def nth(n):
# def skip(s, substr):
# def until(s, substr):
# def ensure_dir(folder):
# def now(format=None):
# def readImgSize(fname, dirName):
# def asciiOnly(s):
# class NoSuchPickle(Exception):
# class PickleException(Exception):
# class Resource(object):
# class CharEnum(object):
# class ChainablyUpdatableOrderedDict(odict):
# class Bag(object):
# class Qnty(qq):


import os
import os.path as osp
import shutil
        import filecmp
        import json
    import sys
from subprocess import check_output
from opentaxforms import ut
        from opentaxforms import main as otf
        from opentaxforms.serve import createApp
            else:
                result,verb='FAIL','does NOT match'
                raise Exception(fmtmsg(result,verb))
class TestOtfSteps(TestOtfBase):
    '''
        These 'steps' tests actually run the script.
        run_1040_full runs 'all steps' and thus doesnt
        start with 'test_' because it runs for several seconds
        '''
    # todo use a less complex form than 1040 to speed testing
    def run_1040_full(self):
        self.run(
            #rootForms=['1040'],
            rootForms='1040',
            filesToCheck=['f1040-p1.html'],
            )
    def test_run_1040_xfa(self):
        self.run(
            #rootForms=['1040'],
            rootForms='1040',
            filesToCheck=['f1040-fmt.xml'],
            steps=['x'],
            # speeds testing
            computeOverlap=False,
            )
    # todo add tests of further steps,
    # todo   made fast via pickled results of previous step

class TestOtfApiBase(object):
    def setup_method(self, _):

# Path: opentaxforms/ut.py
# NL = '\n'
# TAB = '\t'
# def merge(bb1, bb2):
# def numerify(s):
# def compactify(multilineRegex):
#     def crunch(seg):
# def pickle(data, pickleFilePrefix):
# def unpickle(pickleFilePrefix, default=None):
# def flattened(l):
# def hasdups(l, key=None):
# def uniqify(l):
# def uniqify2(l):
# def setupLogging(loggerId, args=None):
# def unsetupLogging():
# def logg(msg, outputs=None):
# def jj(*args, **kw):
# def jdb(*args, **kw):
# def run0(cmd):
# def run(cmd, logprefix='run', loglevel='INFO'):
#     def __init__(self, pkgname, fpath=None):
#     def path(self):
#     def content(self):
#     def keys(cls):
#     def vals(cls):
#     def items(cls):
#     def __init__(self):
#     def __call__(self, **kw):
#     def __init__(self, *maps, **kw):
#     def _getGetitems(self, mapp):
#     def __getitem__(self, key):
#     def __setitem__(self, key, val):
#     def __len__(self):
#     def __call__(self, *keys):
#     def clear(self):
#     def update(self, *maps):
#     def __add__(self, *maps):
#     def __iadd__(self, *maps):
#     def __iter__(self):
#     def iterkeys(self):
#     def keys(self):
#     def values(self):
#     def items(self):
#     def iteritems(self):
#     def get(self, key, dflt=None):
#     def __str__(self):
#     def __repr__(self):
# def notequalpatch(self, o):
#     def fromstring(cls, s):
#     def __hash__(self):
# def playQnty():
# def nth(n):
# def skip(s, substr):
# def until(s, substr):
# def ensure_dir(folder):
# def now(format=None):
# def readImgSize(fname, dirName):
# def asciiOnly(s):
# class NoSuchPickle(Exception):
# class PickleException(Exception):
# class Resource(object):
# class CharEnum(object):
# class ChainablyUpdatableOrderedDict(odict):
# class Bag(object):
# class Qnty(qq):


# Path: test/test_opentaxforms.py
import os
import os.path as osp
import shutil
        import filecmp
        import json
    import sys
from subprocess import check_output
from opentaxforms import ut
        from opentaxforms import main as otf
        from opentaxforms.serve import createApp

            else:
                result,verb='FAIL','does NOT match'
                raise Exception(fmtmsg(result,verb))
class TestOtfSteps(TestOtfBase):
    '''
        These 'steps' tests actually run the script.
        run_1040_full runs 'all steps' and thus doesnt
        start with 'test_' because it runs for several seconds
        '''
    # todo use a less complex form than 1040 to speed testing
    def run_1040_full(self):
        self.run(
            #rootForms=['1040'],
            rootForms='1040',
            filesToCheck=['f1040-p1.html'],
            )
    def test_run_1040_xfa(self):
        self.run(
            #rootForms=['1040'],
            rootForms='1040',
            filesToCheck=['f1040-fmt.xml'],
            steps=['x'],
            # speeds testing
            computeOverlap=False,
            )
    # todo add tests of further steps,
    # todo   made fast via pickled results of previous step

class TestOtfApiBase(object):
    def setup_method(self, _):

        dbResourcePath = ut.Resource('test',