==================
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
  d docs
  d iw
  d iw.example.egg-info
  - setup.cfg
  - setup.py

  >>> ls(tempdir, 'iw.example', 'iw', 'iwexample', 'tests')
  - __init__.py
  - test_iwexampledocs.py
  - test_iwexampledocstrings.py

Go to egg dir::

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

Create a doc test::

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

Create a small module with doctest::

  >>> touch(tempdir, 'iw.example', 'iw', 'iwexample', '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', 'iwexample')
  >>> sh('python tests/test_iwexampledocs.py')
  python tests/test_iwexampledocs.py
  .
  ----------------------------------------------------------------------
  Ran 1 test in ...
  <BLANKLINE>
  OK
  <BLANKLINE>

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


