<reponame>IZUMI-Zu/CS61A<filename>Project/cats/tests/06.py
test = {
  'name': 'Problem 6',
  'points': 2,
  'suites': [
    {
      'cases': [
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("car", "cad", big_limit)
          1
          >>> sphinx_switches("this", "that", big_limit)
          2
          >>> sphinx_switches("one", "two", big_limit)
          3
          >>> sphinx_switches("from", "form", big_limit)
          2
          >>> sphinx_switches("awe", "awesome", big_limit)
          4
          >>> sphinx_switches("someawe", "awesome", big_limit)
          6
          >>> sphinx_switches("awful", "awesome", big_limit)
          5
          >>> sphinx_switches("awful", "awesome", 3) > 3
          True
          >>> sphinx_switches("awful", "awesome", 4) > 4
          True
          >>> sphinx_switches("awful", "awesome", 5) > 5
          False
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("nice", "rice", big_limit)    # Substitute: n -> r
          1
          >>> sphinx_switches("range", "rungs", big_limit)  # Substitute: a -> u, e -> s
          2
          >>> sphinx_switches("pill", "pillage", big_limit) # Don't substitute anything, length difference of 3.
          3
          >>> sphinx_switches("roses", "arose", big_limit)  # Substitute: r -> a, o -> r, s -> o, e -> s, s -> e
          5
          >>> sphinx_switches("rose", "hello", big_limit)   # Substitute: r->h, o->e, s->l, e->l, length difference of 1.
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("goodbye", "good", big_limit)
          3
          >>> sphinx_switches("pront", "print", big_limit)
          1
          >>> sphinx_switches("misspollid", "misspelled", big_limit)
          2
          >>> sphinx_switches("worry", "word", big_limit)
          2
          >>> sphinx_switches("first", "flashy", big_limit)
          4
          >>> sphinx_switches("hash", "ash", big_limit)
          4
          >>> sphinx_switches("ash", "hash", big_limit)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> small_words_list = ["spell", "nest", "test", "pest", "best", "bird", "wired",
          ...                     "abstraction", "abstract", "peeling", "gestate", "west",
          ...                     "spelling", "bastion"]
          >>> autocorrect("speling", small_words_list, sphinx_switches, 10)
          'peeling'
          >>> autocorrect("abstrction", small_words_list, sphinx_switches, 10)
          'abstract'
          >>> autocorrect("wird", small_words_list, sphinx_switches, 10)
          'bird'
          >>> autocorrect("gest", small_words_list, sphinx_switches, 10)
          'nest'
          >>> # ban iteration
          >>> test.check('cats.py', 'sphinx_switches', ['While', 'For'])
          True
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> # ***Check that the recursion stops when the limit is reached***
          >>> import trace, io
          >>> from contextlib import redirect_stdout
          >>> with io.StringIO() as buf, redirect_stdout(buf):
          ...     trace.Trace(trace=True).runfunc(sphinx_switches, "someaweqwertyuio", "awesomeasdfghjkl", 3)
          ...     output = buf.getvalue()
          >>> len([line for line in output.split('\n') if 'funcname' in line]) < 10
          True
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('thong', 'thong', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('place', 'wreat', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pray', 'okee', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cloit', 'cloit', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('yond', 'yo', k) > k for k in range(4)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tb', 'tb', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('gobi', 'gobi', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('watap', 'wotapi', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('baffy', 'bafq', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('else', 'konak', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('zygon', 'zrgoi', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('lar', 'lar', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('shop', 'shd', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pc', 'pc', k) > k for k in range(2)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('sail', 'sail', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fiber', 'fibe', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('doff', 'do', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('meile', 'meilew', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('donor', 'donorc', k) > k for k in range(6)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('meet', 'meeu', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tic', 'tih', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('taft', 'hewer', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('moorn', 'toxa', k) > k for k in range(5)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('hamal', 'hamal', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pridy', 'dance', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dekko', 'ee', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('julio', 'juli', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('boist', 'spume', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('jail', 'jailu', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cumin', 'goes', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('civil', 'whose', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('stead', 'ny', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('mikie', 'mdkie', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('utils', 'utils', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('nuque', 'nuquv', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('chine', 'ihi', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tour', 'erase', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('ak', 'rose', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('sawah', 'shape', k) > k for k in range(5)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('elb', 'logia', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('noily', 'soi', k) > k for k in range(5)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fluid', 'grad', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('titer', 'titegw', k) > k for k in range(6)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('shood', 'shood', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('sher', 'dhey', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dayal', 'qualm', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tenai', 'whata', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('bow', 'how', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tony', 'togqq', k) > k for k in range(5)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('baby', 'ton', k) > k for k in range(4)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('seron', 'seron', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tame', 'tfme', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('kissy', 'kissykd', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('str', 'st', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('enema', 'hnem', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('beden', 'beden', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('coral', 'coral', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('hack', 'haykp', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('alan', 'alan', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('aru', 'aru', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tail', 'tailp', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('corps', 'co', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('kazi', 'kazi', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('bone', 'bone', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('dee', 'dee', k) > k for k in range(3)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fuder', 'fuder', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('harl', 'harvn', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('def', 'de', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('moio', 'yomo', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('amnia', 'agni', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pair', 'pair', k) > k for k in range(4)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('peai', 'seg', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pryse', 'pryseffp', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('amelu', 'samp', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('weak', 'wea', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('atelo', 'atelo', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('uc', 'kc', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('strew', 'jaup', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('dome', 'dume', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('braze', 'sxaze', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('zaman', 'zaman', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('twank', 'renne', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pinky', 'pin', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('spoke', 'spoke', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('recto', 'recto', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('ula', 'ula', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dame', 'froth', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('grane', 'gaane', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cycad', 'cqcad', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('creem', 'creemibh', k) > k for k in range(8)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('alky', 'alfy', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('finds', 'fond', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('argot', 'argotlp', k) > k for k in range(7)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('lc', 'roost', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('mi', 'iran', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('faded', 'fadedfeb', k) > k for k in range(8)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('slee', 'ble', k) > k for k in range(4)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('macro', 'macr', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('bbs', 'bbj', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('roud', 'roud', k) > k for k in range(4)])
          0
          """,
          'hidden': False,
          'locked': False
        }
      ],
      'scored': True,
      'setup': r"""
      >>> from cats import sphinx_switches, autocorrect
      >>> import tests.construct_check as test
      """,
      'teardown': '',
      'type': 'doctest'
    }
  ]
}

test = {
  'name': 'Problem 6',
  'points': 2,
  'suites': [
    {
      'cases': [
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("car", "cad", big_limit)
          1
          >>> sphinx_switches("this", "that", big_limit)
          2
          >>> sphinx_switches("one", "two", big_limit)
          3
          >>> sphinx_switches("from", "form", big_limit)
          2
          >>> sphinx_switches("awe", "awesome", big_limit)
          4
          >>> sphinx_switches("someawe", "awesome", big_limit)
          6
          >>> sphinx_switches("awful", "awesome", big_limit)
          5
          >>> sphinx_switches("awful", "awesome", 3) > 3
          True
          >>> sphinx_switches("awful", "awesome", 4) > 4
          True
          >>> sphinx_switches("awful", "awesome", 5) > 5
          False
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("nice", "rice", big_limit)    # Substitute: n -> r
          1
          >>> sphinx_switches("range", "rungs", big_limit)  # Substitute: a -> u, e -> s
          2
          >>> sphinx_switches("pill", "pillage", big_limit) # Don't substitute anything, length difference of 3.
          3
          >>> sphinx_switches("roses", "arose", big_limit)  # Substitute: r -> a, o -> r, s -> o, e -> s, s -> e
          5
          >>> sphinx_switches("rose", "hello", big_limit)   # Substitute: r->h, o->e, s->l, e->l, length difference of 1.
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> big_limit = 10
          >>> sphinx_switches("goodbye", "good", big_limit)
          3
          >>> sphinx_switches("pront", "print", big_limit)
          1
          >>> sphinx_switches("misspollid", "misspelled", big_limit)
          2
          >>> sphinx_switches("worry", "word", big_limit)
          2
          >>> sphinx_switches("first", "flashy", big_limit)
          4
          >>> sphinx_switches("hash", "ash", big_limit)
          4
          >>> sphinx_switches("ash", "hash", big_limit)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> small_words_list = ["spell", "nest", "test", "pest", "best", "bird", "wired",
          ...                     "abstraction", "abstract", "peeling", "gestate", "west",
          ...                     "spelling", "bastion"]
          >>> autocorrect("speling", small_words_list, sphinx_switches, 10)
          'peeling'
          >>> autocorrect("abstrction", small_words_list, sphinx_switches, 10)
          'abstract'
          >>> autocorrect("wird", small_words_list, sphinx_switches, 10)
          'bird'
          >>> autocorrect("gest", small_words_list, sphinx_switches, 10)
          'nest'
          >>> # ban iteration
          >>> test.check('cats.py', 'sphinx_switches', ['While', 'For'])
          True
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> # ***Check that the recursion stops when the limit is reached***
          >>> import trace, io
          >>> from contextlib import redirect_stdout
          >>> with io.StringIO() as buf, redirect_stdout(buf):
          ...     trace.Trace(trace=True).runfunc(sphinx_switches, "someaweqwertyuio", "awesomeasdfghjkl", 3)
          ...     output = buf.getvalue()
          >>> len([line for line in output.split('\n') if 'funcname' in line]) < 10
          True
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('thong', 'thong', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('place', 'wreat', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pray', 'okee', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cloit', 'cloit', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('yond', 'yo', k) > k for k in range(4)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tb', 'tb', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('gobi', 'gobi', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('watap', 'wotapi', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('baffy', 'bafq', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('else', 'konak', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('zygon', 'zrgoi', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('lar', 'lar', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('shop', 'shd', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pc', 'pc', k) > k for k in range(2)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('sail', 'sail', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fiber', 'fibe', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('doff', 'do', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('meile', 'meilew', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('donor', 'donorc', k) > k for k in range(6)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('meet', 'meeu', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tic', 'tih', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('taft', 'hewer', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('moorn', 'toxa', k) > k for k in range(5)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('hamal', 'hamal', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pridy', 'dance', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dekko', 'ee', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('julio', 'juli', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('boist', 'spume', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('jail', 'jailu', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cumin', 'goes', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('civil', 'whose', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('stead', 'ny', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('mikie', 'mdkie', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('utils', 'utils', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('nuque', 'nuquv', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('chine', 'ihi', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tour', 'erase', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('ak', 'rose', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('sawah', 'shape', k) > k for k in range(5)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('elb', 'logia', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('noily', 'soi', k) > k for k in range(5)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fluid', 'grad', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('titer', 'titegw', k) > k for k in range(6)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('shood', 'shood', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('sher', 'dhey', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dayal', 'qualm', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tenai', 'whata', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('bow', 'how', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tony', 'togqq', k) > k for k in range(5)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('baby', 'ton', k) > k for k in range(4)])
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('seron', 'seron', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('tame', 'tfme', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('kissy', 'kissykd', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('str', 'st', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('enema', 'hnem', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('beden', 'beden', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('coral', 'coral', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('hack', 'haykp', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('alan', 'alan', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('aru', 'aru', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('tail', 'tailp', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('corps', 'co', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('kazi', 'kazi', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('bone', 'bone', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('dee', 'dee', k) > k for k in range(3)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('fuder', 'fuder', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('harl', 'harvn', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('def', 'de', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('moio', 'yomo', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('amnia', 'agni', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pair', 'pair', k) > k for k in range(4)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('peai', 'seg', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('pryse', 'pryseffp', 100)
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('amelu', 'samp', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('weak', 'wea', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('atelo', 'atelo', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('uc', 'kc', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('strew', 'jaup', k) > k for k in range(5)])
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('dome', 'dume', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('braze', 'sxaze', 100)
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('zaman', 'zaman', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('twank', 'renne', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('pinky', 'pin', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('spoke', 'spoke', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('recto', 'recto', k) > k for k in range(5)])
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('ula', 'ula', 100)
          0
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('dame', 'froth', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('grane', 'gaane', k) > k for k in range(5)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('cycad', 'cqcad', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('creem', 'creemibh', k) > k for k in range(8)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('alky', 'alfy', k) > k for k in range(4)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('finds', 'fond', k) > k for k in range(5)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('argot', 'argotlp', k) > k for k in range(7)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('lc', 'roost', 100)
          5
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('mi', 'iran', 100)
          4
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('faded', 'fadedfeb', k) > k for k in range(8)])
          3
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('slee', 'ble', k) > k for k in range(4)])
          2
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sphinx_switches('macro', 'macr', 100)
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('bbs', 'bbj', k) > k for k in range(3)])
          1
          """,
          'hidden': False,
          'locked': False
        },
        {
          'code': r"""
          >>> sum([sphinx_switches('roud', 'roud', k) > k for k in range(4)])
          0
          """,
          'hidden': False,
          'locked': False
        }
      ],
      'scored': True,
      'setup': r"""
      >>> from cats import sphinx_switches, autocorrect
      >>> import tests.construct_check as test
      """,
      'teardown': '',
      'type': 'doctest'
    }
  ]
}
>>> big_limit = 10           >>> sphinx_switches("car", "cad", big_limit)           1           >>> sphinx_switches("this", "that", big_limit)           2           >>> sphinx_switches("one", "two", big_limit)           3           >>> sphinx_switches("from", "form", big_limit)           2           >>> sphinx_switches("awe", "awesome", big_limit)           4           >>> sphinx_switches("someawe", "awesome", big_limit)           6           >>> sphinx_switches("awful", "awesome", big_limit)           5           >>> sphinx_switches("awful", "awesome", 3) > 3           True           >>> sphinx_switches("awful", "awesome", 4) > 4           True           >>> sphinx_switches("awful", "awesome", 5) > 5           False >>> big_limit = 10           >>> sphinx_switches("nice", "rice", big_limit)    # Substitute: n -> r           1           >>> sphinx_switches("range", "rungs", big_limit)  # Substitute: a -> u, e -> s           2           >>> sphinx_switches("pill", "pillage", big_limit) # Don't substitute anything, length difference of 3.           3           >>> sphinx_switches("roses", "arose", big_limit)  # Substitute: r -> a, o -> r, s -> o, e -> s, s -> e           5           >>> sphinx_switches("rose", "hello", big_limit)   # Substitute: r->h, o->e, s->l, e->l, length difference of 1.           5 >>> big_limit = 10           >>> sphinx_switches("goodbye", "good", big_limit)           3           >>> sphinx_switches("pront", "print", big_limit)           1           >>> sphinx_switches("misspollid", "misspelled", big_limit)           2           >>> sphinx_switches("worry", "word", big_limit)           2           >>> sphinx_switches("first", "flashy", big_limit)           4           >>> sphinx_switches("hash", "ash", big_limit)           4           >>> sphinx_switches("ash", "hash", big_limit)           4 >>> small_words_list = ["spell", "nest", "test", "pest", "best", "bird", "wired",           ...                     "abstraction", "abstract", "peeling", "gestate", "west",           ...                     "spelling", "bastion"]           >>> autocorrect("speling", small_words_list, sphinx_switches, 10)           'peeling'           >>> autocorrect("abstrction", small_words_list, sphinx_switches, 10)           'abstract'           >>> autocorrect("wird", small_words_list, sphinx_switches, 10)           'bird'           >>> autocorrect("gest", small_words_list, sphinx_switches, 10)           'nest'           >>> # ban iteration           >>> test.check('cats.py', 'sphinx_switches', ['While', 'For'])           True >>> # ***Check that the recursion stops when the limit is reached***           >>> import trace, io           >>> from contextlib import redirect_stdout           >>> with io.StringIO() as buf, redirect_stdout(buf):           ...     trace.Trace(trace=True).runfunc(sphinx_switches, "someaweqwertyuio", "awesomeasdfghjkl", 3)           ...     output = buf.getvalue()           >>> len([line for line in output.split('\n') if 'funcname' in line]) < 10           True >>> sphinx_switches('thong', 'thong', 100)           0 >>> sphinx_switches('place', 'wreat', 100)           5 >>> sphinx_switches('pray', 'okee', 100)           4 >>> sphinx_switches('cloit', 'cloit', 100)           0 >>> sum([sphinx_switches('yond', 'yo', k) > k for k in range(4)])           2 >>> sphinx_switches('tb', 'tb', 100)           0 >>> sphinx_switches('gobi', 'gobi', 100)           0 >>> sphinx_switches('watap', 'wotapi', 100)           2 >>> sphinx_switches('baffy', 'bafq', 100)           2 >>> sum([sphinx_switches('else', 'konak', k) > k for k in range(5)])           5 >>> sphinx_switches('zygon', 'zrgoi', 100)           2 >>> sphinx_switches('lar', 'lar', 100)           0 >>> sphinx_switches('shop', 'shd', 100)           2 >>> sum([sphinx_switches('pc', 'pc', k) > k for k in range(2)])           0 >>> sphinx_switches('sail', 'sail', 100)           0 >>> sphinx_switches('fiber', 'fibe', 100)           1 >>> sphinx_switches('doff', 'do', 100)           2 >>> sphinx_switches('meile', 'meilew', 100)           1 >>> sum([sphinx_switches('donor', 'donorc', k) > k for k in range(6)])           1 >>> sum([sphinx_switches('meet', 'meeu', k) > k for k in range(4)])           1 >>> sum([sphinx_switches('tic', 'tih', k) > k for k in range(3)])           1 >>> sum([sphinx_switches('taft', 'hewer', k) > k for k in range(5)])           5 >>> sum([sphinx_switches('moorn', 'toxa', k) > k for k in range(5)])           4 >>> sum([sphinx_switches('hamal', 'hamal', k) > k for k in range(5)])           0 >>> sphinx_switches('pridy', 'dance', 100)           5 >>> sphinx_switches('dekko', 'ee', 100)           4 >>> sum([sphinx_switches('julio', 'juli', k) > k for k in range(5)])           1 >>> sum([sphinx_switches('boist', 'spume', k) > k for k in range(5)])           5 >>> sum([sphinx_switches('jail', 'jailu', k) > k for k in range(5)])           1 >>> sphinx_switches('cumin', 'goes', 100)           5 >>> sum([sphinx_switches('civil', 'whose', k) > k for k in range(5)])           5 >>> sum([sphinx_switches('stead', 'ny', k) > k for k in range(5)])           5 >>> sum([sphinx_switches('mikie', 'mdkie', k) > k for k in range(5)])           1 >>> sum([sphinx_switches('utils', 'utils', k) > k for k in range(5)])           0 >>> sum([sphinx_switches('nuque', 'nuquv', k) > k for k in range(5)])           1 >>> sphinx_switches('chine', 'ihi', 100)           3 >>> sum([sphinx_switches('tour', 'erase', k) > k for k in range(5)])           5 >>> sphinx_switches('ak', 'rose', 100)           4 >>> sum([sphinx_switches('sawah', 'shape', k) > k for k in range(5)])           4 >>> sphinx_switches('elb', 'logia', 100)           5 >>> sum([sphinx_switches('noily', 'soi', k) > k for k in range(5)])           3 >>> sphinx_switches('fluid', 'grad', 100)           5 >>> sum([sphinx_switches('titer', 'titegw', k) > k for k in range(6)])           2 >>> sphinx_switches('shood', 'shood', 100)           0 >>> sphinx_switches('sher', 'dhey', 100)           2 >>> sphinx_switches('dayal', 'qualm', 100)           5 >>> sphinx_switches('tenai', 'whata', 100)           5 >>> sphinx_switches('bow', 'how', 100)           1 >>> sum([sphinx_switches('tony', 'togqq', k) > k for k in range(5)])           3 >>> sum([sphinx_switches('baby', 'ton', k) > k for k in range(4)])           4 >>> sphinx_switches('seron', 'seron', 100)           0 >>> sum([sphinx_switches('tame', 'tfme', k) > k for k in range(4)])           1 >>> sphinx_switches('kissy', 'kissykd', 100)           2 >>> sum([sphinx_switches('str', 'st', k) > k for k in range(3)])           1 >>> sphinx_switches('enema', 'hnem', 100)           2 >>> sphinx_switches('beden', 'beden', 100)           0 >>> sphinx_switches('coral', 'coral', 100)           0 >>> sum([sphinx_switches('hack', 'haykp', k) > k for k in range(5)])           2 >>> sphinx_switches('alan', 'alan', 100)           0 >>> sphinx_switches('aru', 'aru', 100)           0 >>> sphinx_switches('tail', 'tailp', 100)           1 >>> sphinx_switches('corps', 'co', 100)           3 >>> sphinx_switches('kazi', 'kazi', 100)           0 >>> sphinx_switches('bone', 'bone', 100)           0 >>> sum([sphinx_switches('dee', 'dee', k) > k for k in range(3)])           0 >>> sphinx_switches('fuder', 'fuder', 100)           0 >>> sum([sphinx_switches('harl', 'harvn', k) > k for k in range(5)])           2 >>> sphinx_switches('def', 'de', 100)           1 >>> sphinx_switches('moio', 'yomo', 100)           2 >>> sum([sphinx_switches('amnia', 'agni', k) > k for k in range(5)])           2 >>> sum([sphinx_switches('pair', 'pair', k) > k for k in range(4)])           0 >>> sphinx_switches('peai', 'seg', 100)           3 >>> sphinx_switches('pryse', 'pryseffp', 100)           3 >>> sphinx_switches('amelu', 'samp', 100)           5 >>> sum([sphinx_switches('weak', 'wea', k) > k for k in range(4)])           1 >>> sphinx_switches('atelo', 'atelo', 100)           0 >>> sphinx_switches('uc', 'kc', 100)           1 >>> sum([sphinx_switches('strew', 'jaup', k) > k for k in range(5)])           5 >>> sum([sphinx_switches('dome', 'dume', k) > k for k in range(4)])           1 >>> sphinx_switches('braze', 'sxaze', 100)           2 >>> sum([sphinx_switches('zaman', 'zaman', k) > k for k in range(5)])           0 >>> sphinx_switches('twank', 'renne', 100)           4 >>> sum([sphinx_switches('pinky', 'pin', k) > k for k in range(5)])           2 >>> sum([sphinx_switches('spoke', 'spoke', k) > k for k in range(5)])           0 >>> sum([sphinx_switches('recto', 'recto', k) > k for k in range(5)])           0 >>> sphinx_switches('ula', 'ula', 100)           0 >>> sphinx_switches('dame', 'froth', 100)           5 >>> sum([sphinx_switches('grane', 'gaane', k) > k for k in range(5)])           1 >>> sphinx_switches('cycad', 'cqcad', 100)           1 >>> sum([sphinx_switches('creem', 'creemibh', k) > k for k in range(8)])           3 >>> sum([sphinx_switches('alky', 'alfy', k) > k for k in range(4)])           1 >>> sum([sphinx_switches('finds', 'fond', k) > k for k in range(5)])           2 >>> sum([sphinx_switches('argot', 'argotlp', k) > k for k in range(7)])           2 >>> sphinx_switches('lc', 'roost', 100)           5 >>> sphinx_switches('mi', 'iran', 100)           4 >>> sum([sphinx_switches('faded', 'fadedfeb', k) > k for k in range(8)])           3 >>> sum([sphinx_switches('slee', 'ble', k) > k for k in range(4)])           2 >>> sphinx_switches('macro', 'macr', 100)           1 >>> sum([sphinx_switches('bbs', 'bbj', k) > k for k in range(3)])           1 >>> sum([sphinx_switches('roud', 'roud', k) > k for k in range(4)])           0 >>> from cats import sphinx_switches, autocorrect       >>> import tests.construct_check as test