==================
iw_python template
==================

Check that the directory does not exist::

  >>> rmdir(tempdir, 'iw.example')

Go to a directory::

  >>> cd(tempdir)

Then use paster::

  >>> sh('paster create -t iw_python iw.example --no-interactive')
  paster create -t iw_python iw.example --no-interactive
  Selected and implied templates:
  ...

  >>> ls(tempdir, 'iw.example')
  CHANGES
  LICENSE
  README.txt
  bootstrap.py
  buildout.cfg
  iw
  iw.example.egg-info
  setup.cfg
  setup.py

  >>> ls(tempdir, 'iw.example', 'iw', 'example', 'tests')
  __init__.py
  test_exampledocs.py
  test_exampledocstrings.py

Go to egg dir::

  >>> cd(tempdir, 'iw.example')

Create a doc test::

  >>> touch(tempdir, 'iw.example', 'iw', 'example', 'doctests', 'README.txt',
  ... data = """
  ...   >>> 1+1
  ...   2
  ... """)

Create a small module with doctest::

  >>> touch(tempdir, 'iw.example', 'iw', 'example', 'utils.py',
  ... data = """
  ... def main():
  ...   '''
  ...     >>> 1+1
  ...     2
  ...   '''
  ...   return True
  ...
  ... """)

Install it::

  >>> sh('python setup.py install')
  python setup.py install
  ...

And run tests::

  >>> cd(tempdir, 'iw.example', 'iw', 'example')
  >>> sh('python tests/test_exampledocs.py')
  python tests/test_exampledocs.py
  .
  ----------------------------------------------------------------------
  Ran 1 test in ...
  <BLANKLINE>
  OK
  <BLANKLINE>

  >>> sh('python tests/test_exampledocstrings.py')
  python tests/test_exampledocstrings.py
  .
  ----------------------------------------------------------------------
  Ran 1 test in ...
  <BLANKLINE>
  OK
  <BLANKLINE>


