Repository: audreyr/cookiecutter
Pull request #905 (2017-02-24 04:06:20)

Handle subprocess output.
Subprocess returns a bytestring, so comparisons with strings in python
3.x throw unexpected errors. This patch decodes bytestrings to strings
and updates tests to return realistic output.

Here's some sample output when the target repo isn't found:

```
(cookiecutter)jmcarp@Joshuas-MBP-3|~/code/cookiecutter on master!
± cookiecutter https://github.com/not/exists
Traceback (most recent call last):
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/cookiecutter/vcs.py", line 123, in clone
    stderr=subprocess.STDOUT,
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/not/exists']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jmcarp/miniconda/envs/cookiecutter/bin/cookiecutter", line 11, in <module>
    load_entry_point('cookiecutter==1.5.1', 'console_scripts', 'cookiecutter')()
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/cookiecutter/cli.py", line 123, in main
    default_config=default_config,
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/cookiecutter/main.py", line 63, in cookiecutter
    no_input=no_input,
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/cookiecutter/repository.py", line 84, in determine_repo_dir
    no_input=no_input,
  File "/Users/jmcarp/miniconda/envs/cookiecutter/lib/python3.6/site-packages/cookiecutter/vcs.py", line 132, in clone
    if 'not found' in clone_error.output.lower():
TypeError: a bytes-like object is required, not 'str'
```


Patch:
diff --git a/.gitignore b/.gitignore
index 446285d..3850476 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,4 +60,3 @@ target/
 
 # PyCharm
 .idea/
-.env
diff --git a/AUTHORS.rst b/AUTHORS.rst
index 44a4ef2..d8dacdf 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -106,12 +106,6 @@ Contributors
 * Nathan Cheung (`@cheungnj`_)
 * Abdó Roig-Maranges (`@aroig`_)
 * Steve Piercy (`@stevepiercy`_)
-* Corey (`@coreysnyder04`_)
-* Dmitry Evstratov (`@devstrat`_)
-* Eyal Levin (`@eyalev`_)
-* mathagician (`@mathagician`_)
-* Guillaume Gelin (`@ramnes`_)
-* @delirious-lettuce (`@delirious-lettuce`_)
 
 .. _`@cedk`: https://github.com/cedk
 .. _`@johtso`: https://github.com/johtso
@@ -206,9 +200,3 @@ Contributors
 .. _`@cheungnj`: https://github.com/cheungnj
 .. _`@aroig`: https://github.com/aroig
 .. _`@stevepiercy`: https://github.com/stevepiercy
-.. _`@coreysnyder04`: https://github.com/coreysnyder04
-.. _`@devstrat`: https://github.com/devstrat
-.. _`@eyalev`: https://github.com/eyalev
-.. _`@mathagician`: https://github.com/mathagician
-.. _`@ramnes`: https://github.com/ramnes
-.. _`@delirious-lettuce`: https://github.com/delirious-lettuce
diff --git a/BACKERS.rst b/BACKERS.rst
deleted file mode 100644
index b20bf44..0000000
--- a/BACKERS.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-=======
-Backers
-=======
-
-We would like to thank the following people for supporting us in our efforts to
-maintain and improve Cookiecutter:
-
-* Bruno Alla
-* Russell Keith-Magee
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 9272740..b297e6e 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -153,8 +153,7 @@ Before you submit a pull request, check that it meets these guidelines:
 2. If the pull request adds functionality, the docs should be updated. Put
    your new functionality into a function with a docstring, and add the
    feature to the list in README.rst.
-3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, 3.6, and PyPy on
-   Appveyor and Travis CI.
+3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, and PyPy on Appveyor and Travis CI.
 4. Check https://travis-ci.org/audreyr/cookiecutter/pull_requests and 
    https://ci.appveyor.com/project/audreyr/cookiecutter/history to ensure the tests pass for all supported Python versions and platforms.
 
@@ -375,8 +374,6 @@ If you merge a pull request, you're responsible for updating `AUTHORS.rst` and `
 
 When you're processing the first change after a release, create boilerplate following the existing pattern:
 
-.. code-block:: rest
-
     x.y.z (Development)
     ~~~~~~~~~~~~~~~~~~~
 
diff --git a/HISTORY.rst b/HISTORY.rst
index 8ab4663..b8ea78c 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -8,92 +8,24 @@ History
 
 New Features:
 
-* Include template path or template URL in cookiecutter context under
-  ``_template``, thanks to `@aroig`_ (#774)
-* Add a URL abbreviation for GitLab template projects, thanks to `@hackebrot`_
-  (#963)
+* ???
 
 Bug Fixes:
 
-* Fix an issue with missing default template abbreviations for when a user
-  defined custom abbreviations, thanks to `@noirbizarre`_ for the issue report
-  and `@hackebrot`_ for the fix (#966, #967)
-* Preserve existing output directory on project generation failure, thanks to
-  `@ionelmc`_ for the report and `@michaeljoseph`_ for the fix (#629, #964)
+* ???
 
 Other Changes:
 
-* Fix broken link to *Copy without Render* docs, thanks to `@coreysnyder04`_
-  (#912)
-* Improve debug log message for when a hook is not found, thanks to
-  `@raphigaziano`_ (#160)
-* Fix module summary and ``expand_abbreviations()`` doc string as per pep257,
-  thanks to `@terryjbates`_ (#772)
-* Update doc strings in ``cookiecutter/cli.py`` and ``cookiecutter/config.py``
-  according to pep257, thanks to `@terryjbates`_ (#922, #931)
-* Update doc string for ``is_copy_only_path()`` according to pep257, thanks to
-  `@mathagician`_ and `@terryjbates`_ (#935, #949)
-* Fix miscellaneous issues with building docs, thanks to `@stevepiercy`_ (#889)
-* Re-implement Makefile and update several make rules, thanks to `@hackebrot`_
-  (#930)
-* Fix broken link to pytest docs, thanks to `@eyalev`_ for the issue report and
-  `@devstrat`_ for the fix (#939, #940)
-* Add ``test_requirements.txt`` file for easier testing outside of tox, thanks
-  to `@ramnes`_ (#945)
-* Improve wording in *copy without render* docs, thanks to `@eyalev`_ (#938)
-* Fix a number of typos, thanks to `@delirious-lettuce`_ (#968)
 * Added more cookiecutter templates to the mix:
 
   * `cookiecutter-kata-cpputest`_ by `@13coders`_ (#901)
   * `cookiecutter-kata-gtest`_ by `@13coders`_ (#901)
-  * `cookiecutter-pyramid-talk-python-starter`_ by `@mikeckennedy`_ (#915)
-  * `cookiecutter-android`_ by `@alexfu`_ (#890)
-  * `cookiecutter-lux-python`_ by `@alexkey`_ (#895)
-  * `cookiecutter-git`_ by `@tuxredux`_ (#921)
-  * `cookiecutter-ansible-role-ci`_ by `@ferrarimarco`_ (#903)
-  * `cookiecutter_dotfile`_ by `@bdcaf`_ (#925)
-  * `painless-continuous-delivery`_ by `@painless-software`_ (#927)
-  * `cookiecutter-molecule`_ by `@retr0h`_ (#954)
-  * `sublime-snippet-package-template`_ by `@agenoria`_ (#956)
-  * `cookiecutter-conda-python`_ by `@conda`_ (#969)
-  * `cookiecutter-flask-minimal`_ by `@candidtim`_ (#977)
-  * `cookiecutter-pypackage-rust-cross-platform-publish`_ by `@mckaymatt`_ (#957)
 
 .. _cookiecutter-kata-gtest: https://github.com/13coders/cookiecutter-kata-gtest
 .. _cookiecutter-kata-cpputest: https://github.com/13coders/cookiecutter-kata-cpputest
-.. _`cookiecutter-pyramid-talk-python-starter`: https://github.com/mikeckennedy/cookiecutter-pyramid-talk-python-starter
-.. _`cookiecutter-android`: https://github.com/alexfu/cookiecutter-android
-.. _`cookiecutter-lux-python`: https://github.com/alexkey/cookiecutter-lux-python
-.. _`cookiecutter-git`: https://github.com/webevllc/cookiecutter-git
-.. _`cookiecutter_dotfile`: https://github.com/bdcaf/cookiecutter_dotfile
-.. _`cookiecutter-ansible-role-ci`: https://github.com/ferrarimarco/cookiecutter-ansible-role
-.. _`painless-continuous-delivery`: https://github.com/painless-software/painless-continuous-delivery
-.. _`cookiecutter-molecule`: https://github.com/retr0h/cookiecutter-molecule
-.. _`sublime-snippet-package-template`: https://github.com/agenoria/sublime-snippet-package-template
-.. _`cookiecutter-conda-python`: https://github.com/conda/cookiecutter-conda-python
-.. _`cookiecutter-flask-minimal`: https://github.com/candidtim/cookiecutter-flask-minimal
-.. _`cookiecutter-pypackage-rust-cross-platform-publish`: https://github.com/mckaymatt/cookiecutter-pypackage-rust-cross-platform-publish
 
 .. _`@13coders`: https://github.com/13coders
-.. _`@coreysnyder04`: https://github.com/coreysnyder04
-.. _`@mikeckennedy`: https://github.com/mikeckennedy
-.. _`@alexfu`: https://github.com/alexfu
-.. _`@alexkey`: https://github.com/alexkey
-.. _`@tuxredux`: https://github.com/tuxredux
-.. _`@ferrarimarco`: https://github.com/ferrarimarco
-.. _`@eyalev`: https://github.com/eyalev
-.. _`@devstrat`: https://github.com/devstrat
-.. _`@mathagician`: https://github.com/mathagician
-.. _`@bdcaf`: https://github.com/bdcaf
-.. _`@ramnes`: https://github.com/ramnes
-.. _`@painless-software`: https://github.com/painless-software
-.. _`@retr0h`: https://github.com/retr0h
-.. _`@agenoria`: https://github.com/agenoria
-.. _`@noirbizarre`: https://github.com/noirbizarre
-.. _`@delirious-lettuce`: https://github.com/delirious-lettuce
-.. _`@conda`: https://github.com/conda
-.. _`@candidtim`: https://github.com/candidtim
-.. _`@mckaymatt`: https://github.com/mckaymatt
+
 
 1.5.1 (2017-02-04) Alfajor
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/LICENSE b/LICENSE
index 0ae7eaf..bc1a87a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013-2017, Audrey Roy
+Copyright (c) 2013-2015, Audrey Roy
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or
diff --git a/Makefile b/Makefile
index 2a36bf3..98af05c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-PYPI_SERVER = pypitest
-
+.PHONY: clean-tox clean-pyc clean-build docs
 define BROWSER_PYSCRIPT
 import os, webbrowser, sys
 try:
@@ -12,110 +11,87 @@ endef
 export BROWSER_PYSCRIPT
 BROWSER := python -c "$$BROWSER_PYSCRIPT"
 
-.DEFAULT_GOAL := help
-
-.PHONY: clean-tox
-clean-tox: ## Remove tox testing artifacts
-	@echo "+ $@"
-	@rm -rf .tox/
-
-.PHONY: clean-build
-clean-build: ## Remove build artifacts
-	@echo "+ $@"
-	@rm -fr build/
-	@rm -fr dist/
-	@rm -fr *.egg-info
-
-.PHONY: clean-pyc
-clean-pyc: ## Remove Python file artifacts
-	@echo "+ $@"
-	@find . -type d -name '__pycache__' -exec rm -rf {} +
-	@find . -type f -name '*.py[co]' -exec rm -f {} +
-	@find . -name '*~' -exec rm -f {} +
-
-.PHONY: clean
-clean: clean-tox clean-build clean-pyc ## Remove all file artifacts
-
-.PHONY: lint
-lint: ## Check code style with flake8
-	@echo "+ $@"
-	@tox -e flake8
-
-.PHONY: test
-test: ## Run tests quickly with the default Python
-	@echo "+ $@"
-	@tox -e py
-
-.PHONY: test-all
-test-all: ## Run tests on every Python version with tox
-	@echo "+ $@"
-	@tox
-
-.PHONY: coverage
-coverage: ## Check code coverage quickly with the default Python
-	@echo "+ $@"
-	@tox -e cov-report
-	@$(BROWSER) htmlcov/index.html
-
-.PHONY: docs
-docs: ## Generate Sphinx HTML documentation, including API docs
-	@echo "+ $@"
-	@rm -f docs/cookiecutter.rst
-	@sphinx-apidoc -o docs/ cookiecutter
-	@rm -f docs/modules.rst
-	@$(MAKE) -C docs clean
-	@$(MAKE) -C docs html
-	@$(MAKE) contributing
-	@$(BROWSER) docs/_build/html/index.html
-
-.PHONY: servedocs
-servedocs: docs ## Rebuild docs automatically
-	@echo "+ $@"
-	@watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
-
-.PHONY: submodules
-submodules: ## Pull and update git submodules recursively
-	@echo "+ $@"
-	@git pull --recurse-submodules
-	@git submodule update --init --recursive
-
-.PHONY: release
-release: clean ## Package and upload release
-	@echo "+ $@"
-	@python setup.py sdist bdist_wheel
-	@twine upload -r $(PYPI_SERVER) dist/*
-
-.PHONY: sdist
-sdist: clean ## Build sdist distribution
-	@echo "+ $@"
-	@python setup.py sdist
-	@ls -l dist
-
-.PHONY: wheel
-wheel: clean ## Build bdist_wheel distribution
-	@echo "+ $@"
-	@python setup.py bdist_wheel
-	@ls -l dist
-
-.PHONY: contributing
-contributing: ## Generate CONTRIBUTING.rst
-	@echo "+ $@"
-	@rm CONTRIBUTING.rst
-	@touch CONTRIBUTING.rst
-	@cat docs/contributing.rst >> CONTRIBUTING.rst
-	@echo "\n\n" >> CONTRIBUTING.rst
-	@cat docs/types_of_contributions.rst >> CONTRIBUTING.rst
-	@echo "\n\n" >> CONTRIBUTING.rst
-	@cat docs/contributor_setup.rst >> CONTRIBUTING.rst
-	@echo "\n\n" >> CONTRIBUTING.rst
-	@cat docs/contributor_guidelines.rst >> CONTRIBUTING.rst
-	@echo "\n\n" >> CONTRIBUTING.rst
-	@cat docs/contributor_testing.rst >> CONTRIBUTING.rst
-	@echo "\n\n" >> CONTRIBUTING.rst
-	@cat docs/core_committer_guide.rst >> CONTRIBUTING.rst
-	@echo "\n\nAutogenerated from the docs via \`make contributing\`" >> CONTRIBUTING.rst
-	@echo "WARNING: Don't forget to replace any :ref: statements with literal names"
-
-.PHONY: help
 help:
-	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
+	@echo "clean-build - remove build artifacts"
+	@echo "clean-pyc - remove Python file artifacts"
+	@echo "clean-tox - remove tox testing artifacts"
+	@echo "lint - check style with flake8"
+	@echo "test - run tests quickly with the default Python"
+	@echo "test-all - run tests on every Python version with tox"
+	@echo "coverage - check code coverage quickly with the default Python"
+	@echo "docs - generate Sphinx HTML documentation, including API docs"
+	@echo "release - package and upload a release"
+	@echo "sdist - package"
+	@echo "submodules - pull and update git submodules recursively"
+
+clean: clean-tox clean-build clean-pyc
+
+clean-build:
+	rm -fr build/
+	rm -fr dist/
+	rm -fr *.egg-info
+
+clean-pyc:
+	find . -type d -name '__pycache__' -exec rm -rf {} +
+	find . -type f -name '*.py[co]' -exec rm -f {} +
+	find . -name '*~' -exec rm -f {} +
+
+clean-tox:
+	rm -rf .tox/
+
+lint:
+	flake8 cookiecutter tests
+
+test:
+	tox -e py
+
+test-all:
+	tox
+
+
+coverage:
+	tox -e cov-report
+	$(BROWSER) htmlcov/index.html
+
+submodules:
+	git pull --recurse-submodules
+	git submodule update --init --recursive
+
+docs:
+	rm -f docs/cookiecutter.rst
+	sphinx-apidoc -o docs/ cookiecutter
+	rm -f docs/modules.rst
+	$(MAKE) -C docs clean
+	$(MAKE) -C docs html
+	make contributing
+	$(BROWSER) docs/_build/html/index.html
+
+servedocs: docs
+	watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
+
+release: clean
+	python setup.py sdist bdist_wheel upload
+
+sdist: clean
+	python setup.py sdist
+	ls -l dist
+
+wheel: clean
+	python setup.py bdist_wheel
+	ls -l dist
+contributing:
+	rm CONTRIBUTING.rst
+	touch CONTRIBUTING.rst
+	cat docs/contributing.rst >> CONTRIBUTING.rst
+	echo "\n\n" >> CONTRIBUTING.rst
+	cat docs/types_of_contributions.rst >> CONTRIBUTING.rst
+	echo "\n\n" >> CONTRIBUTING.rst
+	cat docs/contributor_setup.rst >> CONTRIBUTING.rst
+	echo "\n\n" >> CONTRIBUTING.rst
+	cat docs/contributor_guidelines.rst >> CONTRIBUTING.rst
+	echo "\n\n" >> CONTRIBUTING.rst
+	cat docs/contributor_testing.rst >> CONTRIBUTING.rst
+	echo "\n\n" >> CONTRIBUTING.rst
+	cat docs/core_committer_guide.rst >> CONTRIBUTING.rst
+	echo "\n\nAutogenerated from the docs via \`make contributing\`" >> CONTRIBUTING.rst
+	echo "WARNING: Don't forget to replace any :ref: statements with literal names"
diff --git a/README.rst b/README.rst
index b933325..5a89f40 100644
--- a/README.rst
+++ b/README.rst
@@ -5,7 +5,7 @@ Cookiecutter
 .. image:: https://img.shields.io/pypi/v/cookiecutter.svg
         :target: https://pypi.python.org/pypi/cookiecutter
 
-.. image:: https://travis-ci.org/audreyr/cookiecutter.svg?branch=master
+.. image:: https://travis-ci.org/audreyr/cookiecutter.png?branch=master
         :target: https://travis-ci.org/audreyr/cookiecutter
 
 .. image:: https://ci.appveyor.com/api/projects/status/github/audreyr/cookiecutter?branch=master
@@ -34,10 +34,10 @@ templates), e.g. creating a Python package project from a Python package project
 
 * Documentation: https://cookiecutter.readthedocs.io
 * GitHub: https://github.com/audreyr/cookiecutter
+* Free software: BSD license
 * PyPI: https://pypi.python.org/pypi/cookiecutter
-* Free and open source software: `BSD license`_
 
-.. image:: https://raw.github.com/audreyr/cookiecutter/3ac078356adf5a1a72042dfe72ebfa4a9cd5ef38/logo/cookiecutter_medium.png
+.. image:: https://raw.github.com/audreyr/cookiecutter/aa309b73bdc974788ba265d843a65bb94c2e608e/cookiecutter_medium.png
 
 We are proud to be an open source sponsor of `PyCon 2016`_.
 
@@ -48,8 +48,8 @@ Did someone say features?
 
 * Cross-platform: Windows, Mac, and Linux are officially supported.
 
-* Works with Python 2.7, 3.3, 3.4, 3.5, 3.6, and PyPy. *(But you don't have to
-  know/write Python code to use Cookiecutter.)*
+* Works with Python 2.7, 3.3, 3.4, 3.5, and PyPy. *(But you don't have to know/write Python
+  code to use Cookiecutter.)*
 
 * Project templates can be in any programming language or markup format:
   Python, JavaScript, Ruby, CoffeeScript, RST, Markdown, CSS, HTML, you name
@@ -187,8 +187,6 @@ Categories of Cookiecutters
 `Python-Django`_ |
 `Python-Pyramid`_ |
 `Cookiecutter (meta)`_ |
-`Ansible`_ |
-`Git`_ |
 `C`_ |
 `C++`_ |
 `C#`_ |
@@ -206,8 +204,7 @@ Categories of Cookiecutters
 `6502 Assembly`_ |
 `Data Science`_ |
 `Tornado`_ |
-`Reproducible Science`_ |
-`Continuous Delivery`_
+`Reproducible Science`_
 
 If you don't find a cookiecutter that suits your needs here, please consider
 writing or suggesting one. We wish for our users to find a solution for their
@@ -248,7 +245,7 @@ Cookiecutter, show support:
 
 * Thank a core committer for their efforts.
 * Star `Cookiecutter on GitHub`_.
-* `Support this project`_
+* Join the `Cookiecutter Gittip community`_.
 
 Got criticism or complaints?
 
@@ -275,31 +272,13 @@ Waiting for a response to an issue/question?
 Support This Project
 --------------------
 
-This project is run by volunteers. Please support them in their efforts to
-maintain and improve Cookiecutter:
+This project is maintained by volunteers. Support their efforts by spreading the word about:
 
-* Daniel Roy Greenfeld (`@pydanny`_): `patreon.com/danielroygreenfeld`_
-* Raphael Pierzina (`@hackebrot`_): `patreon.com/hackebrot`_
-
-.. _`patreon.com/danielroygreenfeld`: https://www.patreon.com/danielroygreenfeld
-.. _`patreon.com/hackebrot`: https://www.patreon.com/hackebrot
-
-You can also support the maintainers by spreading the word about Two Scoops of
-Django 1.11!
-
-.. image:: https://cdn.shopify.com/s/files/1/0304/6901/files/tsd-111-alpha-470x235.jpg?11350964796982104043
-   :name: Two Scoops Press
+.. image:: https://s3.amazonaws.com/tsacademy/images/tsa-logo-250x60-transparent-01.png
+   :name: Two Scoops Academy
    :align: center
-   :alt: Two Scoops Press
-   :target: https://www.twoscoopspress.com/products/two-scoops-of-django-1-11
-
-Backers
--------
-
-We would like to thank the following people for supporting us:
-
-* Bruno Alla
-* Russell Keith-Magee
+   :alt: Two Scoops Academy
+   :target: http://www.twoscoops.academy/
 
 Code of Conduct
 ---------------
@@ -323,26 +302,26 @@ Python
 * `cookiecutter-pypackage`_: `@audreyr`_'s ultimate Python package project
   template.
 * `cookiecutter-pipproject`_: Minimal package for pip-installable projects
-* `cookiecutter-pypackage-minimal`_: A minimal Python package template.
-* `cookiecutter-lux-python`_: A boilerplate Python project that aims to create Python package with a convenient Makefile-facility and additional helpers.
 * `cookiecutter-flask`_ : A Flask template with Bootstrap 3, starter templates, and working user registration.
 * `cookiecutter-flask-2`_: A heavier weight fork of cookiecutter-flask, with more boilerplate including forgotten password and Heroku integration
 * `cookiecutter-flask-foundation`_ : Flask Template with caching, forms, sqlalchemy and unit-testing.
-* `cookiecutter-flask-minimal`_ : Minimal but production-ready Flask project template with no other dependencies except for Flask itself.
 * `cookiecutter-bottle`_ : A cookiecutter template for creating reusable Bottle projects quickly.
 * `cookiecutter-openstack`_: A template for an OpenStack project.
 * `cookiecutter-docopt`_: A template for a Python command-line script that uses `docopt`_ for arguments parsing.
 * `cookiecutter-quokka-module`_: A template to create a blueprint module for Quokka Flask CMS.
 * `cookiecutter-kivy`_: A template for NUI applications built upon the kivy python-framework.
 * `cookiedozer`_: A template for Python Kivy apps ready to be deployed to android devices with Buildozer.
+* `cookiecutter-pypackage-minimal`_: A minimal Python package template.
+* `cookiecutter-ansible-role`_: A template to create ansible roles. Forget about file creation and focus on actions.
 * `cookiecutter-pylibrary`_: An intricate template designed to quickly get started with good testing and packaging (working configuration for Tox, Pytest, Travis-CI, Coveralls, AppVeyor, Sphinx docs, isort, bumpversion, packaging checks etc).
-* `cookiecutter-pyvanguard`_: A template for cutting edge Python development. `Invoke`_, pytest, bumpversion, and Python 2/3 compatibility.
+* `cookiecutter-pyvanguard`_: A template for cutting edge Python development. `Invoke`_, pytest, bumpversion, and Python 2/3 compatability.
 * `Python-iOS-template`_: A template to create a Python project that will run on iOS devices.
 * `Python-Android-template`_: A template to create a Python project that will run on Android devices.
 * `cookiecutter-tryton`_: A template to create base and external Tryton modules.
 * `cookiecutter-tryton-fulfilio`_: A template for creating tryton modules.
 * `cookiecutter-pytest-plugin`_: Minimal Cookiecutter template for authoring `pytest`_ plugins that help you to write better programs.
 * `cookiecutter-tapioca`_: A Template for building `tapioca-wrapper`_ based web API wrappers (clients).
+* `cookiecutter-sublime-text-3-plugin`_: Sublime Text 3 plugin template with custom settings, commands, key bindings and main menu.
 * `cookiecutter-muffin`_: A Muffin template with Bootstrap 3, starter templates, and working user registration.
 * `cookiecutter-octoprint-plugin`_: A template for building plugins for `OctoPrint`_.
 * `cookiecutter-funkload-friendly`_: Cookiecutter template for a `funkload-friendly`_ project.
@@ -354,17 +333,12 @@ Python
 * `cookiecutter-pyqt5`_: A prebuilt PyQt5 GUI template with a fully featured Pytest test suite and Travis CI integration all in an optimal Python package.
 * `cookiecutter-pyqt4`_: A prebuilt PyQt4 GUI template with a logging support, structure for tests and separation of ui and worker components.
 * `cookiecutter-xontrib`_: A template for building xontribs, a.k.a `xonsh`_ contributions
-* `cookiecutter-conda-python`_: A template for building Conda Python packages
-* `cookiecutter-pypackage-rust-cross-platform-publish`_: A template for a Python wheel containing a Rust binary module that supports releasing on Windows, OSX and Linux. 
 
 .. _`cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
 .. _`cookiecutter-pipproject`: https://github.com/wdm0006/cookiecutter-pipproject
-.. _`cookiecutter-pypackage-minimal`: https://github.com/kragniz/cookiecutter-pypackage-minimal
-.. _`cookiecutter-lux-python`: https://github.com/alexkey/cookiecutter-lux-python
 .. _`cookiecutter-flask`: https://github.com/sloria/cookiecutter-flask
 .. _`cookiecutter-flask-2`: https://github.com/wdm0006/cookiecutter-flask
 .. _`cookiecutter-flask-foundation`: https://github.com/JackStouffer/cookiecutter-Flask-Foundation
-.. _`cookiecutter-flask-minimal`: https://github.com/candidtim/cookiecutter-flask-minimal
 .. _`cookiecutter-bottle`: https://github.com/avelino/cookiecutter-bottle
 .. _`cookiecutter-openstack`: https://github.com/openstack-dev/cookiecutter
 .. _`cookiecutter-docopt`: https://github.com/sloria/cookiecutter-docopt
@@ -372,6 +346,8 @@ Python
 .. _`cookiecutter-quokka-module`: https://github.com/pythonhub/cookiecutter-quokka-module
 .. _`cookiecutter-kivy`: https://github.com/hackebrot/cookiecutter-kivy
 .. _`cookiedozer`: https://github.com/hackebrot/cookiedozer
+.. _`cookiecutter-pypackage-minimal`: https://github.com/kragniz/cookiecutter-pypackage-minimal
+.. _`cookiecutter-ansible-role`: https://github.com/iknite/cookiecutter-ansible-role
 .. _`cookiecutter-pylibrary`: https://github.com/ionelmc/cookiecutter-pylibrary
 .. _`cookiecutter-pyvanguard`: https://github.com/robinandeer/cookiecutter-pyvanguard
 .. _`Invoke`: http://docs.pyinvoke.org/en/latest/
@@ -383,6 +359,7 @@ Python
 .. _`pytest`: http://pytest.org/latest/
 .. _`cookiecutter-tapioca`: https://github.com/vintasoftware/cookiecutter-tapioca
 .. _`tapioca-wrapper`: https://github.com/vintasoftware/tapioca-wrapper
+.. _`cookiecutter-sublime-text-3-plugin`: https://github.com/kkujawinski/cookiecutter-sublime-text-3-plugin
 .. _`cookiecutter-muffin`: https://github.com/drgarcia1986/cookiecutter-muffin
 .. _`cookiecutter-octoprint-plugin`: https://github.com/OctoPrint/cookiecutter-octoprint-plugin
 .. _`OctoPrint`: https://github.com/foosel/OctoPrint
@@ -399,8 +376,7 @@ Python
 .. _`cookiecutter-pyqt4`: https://github.com/aeroaks/cookiecutter-pyqt4
 .. _`cookiecutter-xontrib`: https://github.com/laerus/cookiecutter-xontrib
 .. _`xonsh`: https://github.com/xonsh/xonsh
-.. _`cookiecutter-conda-python`: https://github.com/conda/cookiecutter-conda-python
-.. _`cookiecutter-pypackage-rust-cross-platform-publish`: https://github.com/mckaymatt/cookiecutter-pypackage-rust-cross-platform-publish
+
 
 Python-Django
 ^^^^^^^^^^^^^
@@ -412,8 +388,8 @@ Python-Django
 * `cookiecutter-djangopackage`_: A template designed to create reusable third-party PyPI friendly Django apps. Documentation is written in tutorial format.
 * `cookiecutter-django-cms`_: A template for Django CMS with simple Bootstrap 3 template. It has a quick start and deploy documentation.
 * `cookiecutter-django-crud`_: A template to create a Django app with boilerplate CRUD around a model including a factory and tests.
-* `cookiecutter-django-lborgav`_: Another cookiecutter template for Django project with Bootstrap 3 and FontAwesome 4
-* `cookiecutter-django-paas`_: Django template ready to use in PAAS platforms like Heroku, OpenShift, etc..
+* `cookiecutter-django-lborgav`_: Another cookiecutter template for Django project with Booststrap 3 and FontAwesome 4
+* `cookiecutter-django-paas`_: Django template ready to use in SAAS platforms like Heroku, OpenShift, etc..
 * `cookiecutter-django-rest-framework`_: A template for creating reusable Django REST Framework packages.
 * `cookiecutter-django-aws-eb`_: Get up and running with Django on AWS Elastic Beanstalk.
 * `cookiecutter-wagtail`_ : A cookiecutter template for `Wagtail`_ CMS based sites.
@@ -461,16 +437,14 @@ Python-Pyramid
 ^^^^^^^^^^^^^^
 
 * `pyramid-cookiecutter-alchemy`_: A Cookiecutter (project template) for creating a Pyramid project using SQLite for persistent storage, SQLAlchemy for an ORM, URL dispatch for routing, and Jinja2 for templating.
-* `pyramid-cookiecutter-starter`_: A Cookiecutter (project template) for creating a Pyramid starter project using URL dispatch for routing and either Jinja2, Chameleon, or Mako for templating.
+* `pyramid-cookiecutter-starter`_: A Cookiecutter (project template) for creating a Pyramid starter project using URL dispatch for routing and Jinja2 for templating.
 * `pyramid-cookiecutter-zodb`_: A Cookiecutter (project template) for creating a Pyramid project using ZODB for persistent storage, traversal for routing, and Chameleon for templating.
 * `substanced-cookiecutter`_: A cookiecutter (project template) for creating a Substance D starter project. Substance D is built on top of Pyramid.
-* `cookiecutter-pyramid-talk-python-starter`_: An opinionated Cookiecutter template for creating Pyramid web applications starting way further down the development chain. This cookiecutter template will create a new Pyramid web application with email, sqlalchemy, rollbar, and way more integrated.
 
 .. _`pyramid-cookiecutter-alchemy`: https://github.com/Pylons/pyramid-cookiecutter-alchemy
 .. _`pyramid-cookiecutter-starter`: https://github.com/Pylons/pyramid-cookiecutter-starter
 .. _`pyramid-cookiecutter-zodb`: https://github.com/Pylons/pyramid-cookiecutter-zodb
 .. _`substanced-cookiecutter`: https://github.com/Pylons/substanced-cookiecutter
-.. _`cookiecutter-pyramid-talk-python-starter`: https://github.com/mikeckennedy/cookiecutter-pyramid-talk-python-starter
 
 Cookiecutter (meta)
 ~~~~~~~~~~~~~~~~~~~
@@ -481,26 +455,6 @@ Meta-templates for generating Cookiecutter project templates.
 
 .. _`cookiecutter-template`: https://github.com/eviweb/cookiecutter-template
 
-Ansible
-~~~~~~~
-
-* `cookiecutter-molecule`_: Create `Molecule`_ roles following community best practices, with an already implemented test infrastructure leveraging `Molecule`_, Docker and Testinfra.
-* `cookiecutter-ansible-role`_: A template to create ansible roles. Forget about file creation and focus on actions.
-* `cookiecutter-ansible-role-ci`_: Create Ansible roles following best practices, with an already implemented test infrastructure leveraging Test-kitchen, Docker and InSpec.
-
-.. _`cookiecutter-ansible-role`: https://github.com/iknite/cookiecutter-ansible-role
-.. _`cookiecutter-ansible-role-ci`: https://github.com/ferrarimarco/cookiecutter-ansible-role
-.. _`cookiecutter-molecule`: https://github.com/retr0h/cookiecutter-molecule
-
-.. _`Molecule`: http://molecule.readthedocs.io/en/v2/
-
-Git
-~~~
-
-* `cookiecutter-git`_: Git Cookiecutter. A git repository project template!
-
-.. _`cookiecutter-git`: https://github.com/webevllc/cookiecutter-git
-
 
 C
 ~~
@@ -556,18 +510,16 @@ Golang
 
 * `cookiecutter-golang`_: A template to create new go based projects following best practices.
 
-.. _`cookiecutter-golang`: https://github.com/lacion/cookiecutter-golang
+.. _`cookiecutter-golang`: https://github.com/lacion/cookiecutter-golang 
 
 Java
 ~~~~
 
 * `cookiecutter-java`_: Cookiecutter for basic java application setup with gradle
 * `cookiecutter-spring-boot`_: Cookiecutter for standard java spring boot gradle application
-* `cookiecutter-android`_: Cookiecutter for Gradle-based Android projects
 
 .. _`cookiecutter-java`: https://github.com/m-x-k/cookiecutter-java.git
 .. _`cookiecutter-spring-boot`: https://github.com/m-x-k/cookiecutter-spring-boot.git
-.. _`cookiecutter-android`: https://github.com/alexfu/cookiecutter-android
 
 
 JS
@@ -623,15 +575,6 @@ PHP
 .. _`cookiecutter-mediawiki-extension`: https://github.com/JonasGroeger/cookiecutter-mediawiki-extension
 
 
-Sublime Text
-~~~~~~~~~~~~
-
-* `cookiecutter-sublime-text-3-plugin`_: Sublime Text 3 plugin template with custom settings, commands, key bindings and main menu.
-* `sublime-snippet-package-template`_: Template for Sublime Text packages containing snippets.
-
-.. _`cookiecutter-sublime-text-3-plugin`: https://github.com/kkujawinski/cookiecutter-sublime-text-3-plugin
-.. _`sublime-snippet-package-template`: https://github.com/agenoria/sublime-snippet-package-template
-
 Berkshelf-Vagrant
 ~~~~~~~~~~~~~~~~~
 
@@ -645,7 +588,7 @@ HTML
 
 * `cookiecutter-complexity`_: A cookiecutter for a Complexity static site with Bootstrap 3.
 * `cookiecutter-reveal.js`_: A cookiecutter template for reveal.js presentations.
-* `cookiecutter-tumblr-theme`_: A cookiecutter for a Tumblr theme project with GruntJS as concatenation tool.
+* `cookiecutter-tumblr-theme`_: A cookiecutter for a Tumblr theme project with GruntJS as concatination tool.
 
 .. _`cookiecutter-complexity`: https://github.com/audreyr/cookiecutter-complexity
 .. _`cookiecutter-reveal.js`: https://github.com/keimlink/cookiecutter-reveal.js
@@ -673,30 +616,21 @@ Data Science
 
 * `widget-cookiecutter`_: A cookiecutter template for creating a custom Jupyter widget project.
 * `cookiecutter-data-science`_: A logical, reasonably standardized, but flexible project structure for doing and sharing data science work in Python.  Full documentation available `here <http://drivendata.github.io/cookiecutter-data-science/>`__.
-* `cookiecutter-r-data-analysis`_: Template for a R based workflow to docx (via Pandoc) and pdf (via LaTeX) reports.
 
 .. _`widget-cookiecutter`: https://github.com/jupyter/widget-cookiecutter
 .. _`cookiecutter-data-science`: https://github.com/drivendata/cookiecutter-data-science
-.. _`cookiecutter-r-data-analysis`: https://github.com/bdcaf/cookiecutter-r-data-analysis
 
 Reproducible Science
 ~~~~~~~~~~~~~~~~~~~~
 
-* `cookiecutter-reproducible-science`_: A cookiecutter template to start a reproducible and transparent science project including data, models, analysis, and reports (i.e., your scientific paper) with close resemblances to the philosophy of Cookiecutter `Data Science`_.
+* `cookiecutter-reproducible-science`_: A cookiecutter template to start a reproducible and transparent science project including data, models, analysis, and reports (i.e., your scientifc paper) with close resemblances to the philosophy of Cookiecutter `Data Science`_.
 
 .. _`cookiecutter-reproducible-science`: https://github.com/mkrapp/cookiecutter-reproducible-science
 
-Continuous Delivery
-~~~~~~~~~~~~~~~~~~~
-
-* `painless-continuous-delivery`_: A cookiecutter template for software development setups with continuous delivery baked in. Python (Django, Flask), and experimental PHP support.
-
-.. _`painless-continuous-delivery`: https://github.com/painless-software/painless-continuous-delivery
-
 Cloud Tools
 ~~~~~~~~~~~~
 
-* `cookiecutter-tf-module`_: Cookiecutter template for building consistent Terraform modules.
+* `cookiecutter-tf-module`_: Cookiecutter template for building consistent Terraform modules. 
 
 .. _`cookiecutter-tf-module`: https://github.com/DualSpark/cookiecutter-tf-module
 
@@ -707,13 +641,6 @@ Tornado
 
 .. _`cookiecutter-tornado`: https://github.com/hkage/cookiecutter-tornado
 
-Other
-~~~~~
-
-* `cookiecutter_dotfile`_: Template for a folder of dotfiles managed by stow.
-
-.. _`cookiecutter_dotfile`: https://github.com/bdcaf/cookiecutter_dotfile
-
 Similar projects
 ----------------
 
@@ -762,7 +689,6 @@ Similar projects
 
 .. _`PyPA Code of Conduct`: https://www.pypa.io/en/latest/code-of-conduct/
 .. _`PyCon 2016`: https://us.pycon.org/2016/sponsors/
-.. _`BSD license`: https://github.com/audreyr/cookiecutter/blob/master/LICENSE
 
 .. _`Cookiecutter on GitHub`: https://github.com/audreyr/cookiecutter
 .. _`Troubleshooting`: http://cookiecutter.readthedocs.io/en/latest/troubleshooting.html
@@ -770,6 +696,7 @@ Similar projects
 .. _`contributing instructions`: https://github.com/audreyr/cookiecutter/blob/master/CONTRIBUTING.rst
 .. _`Stack Overflow`: http://stackoverflow.com/
 .. _`File an issue`: https://github.com/audreyr/cookiecutter/issues?state=open
+.. _`Cookiecutter Gittip community`: https://www.gittip.com/for/cookiecutter/
 .. _`@audreyr`: https://github.com/audreyr
 .. _`@pydanny`: https://github.com/pydanny
 .. _`@michaeljoseph`: https://github.com/michaeljoseph
diff --git a/appveyor.yml b/appveyor.yml
index 290deb7..70f44a5 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,11 +27,6 @@ environment:
     - PYTHON: "C:\\Python35-x64"
       TOX_ENV: "py35"
 
-    - PYTHON: "C:\\Python36"
-      TOX_ENV: "py36"
-
-    - PYTHON: "C:\\Python36-x64"
-      TOX_ENV: "py36"
 
 init:
   - set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py
index aea78cd..37c8302 100644
--- a/cookiecutter/cli.py
+++ b/cookiecutter/cli.py
@@ -1,6 +1,11 @@
 # -*- coding: utf-8 -*-
 
-"""Main `cookiecutter` CLI."""
+"""
+cookiecutter.cli
+-----------------
+
+Main `cookiecutter` CLI.
+"""
 
 import os
 import sys
@@ -23,7 +28,7 @@ from cookiecutter.exceptions import (
 
 
 def version_msg():
-    """Return the Cookiecutter version, location and Python powering it."""
+    """Returns the Cookiecutter version, location and Python powering it."""
     python_version = sys.version[:3]
     location = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
     message = u'Cookiecutter %(version)s from {} (Python {})'
@@ -31,7 +36,6 @@ def version_msg():
 
 
 def validate_extra_context(ctx, param, value):
-    """Validate extra context."""
     for s in value:
         if '=' not in s:
             raise click.BadParameter(
@@ -96,6 +100,7 @@ def main(
     volunteers. If you would like to help out or fund the project, please get
     in touch at https://github.com/audreyr/cookiecutter.
     """
+
     # If you _need_ to support a local template in a directory
     # called 'help', use a qualified path to the directory.
     if template == u'help':
diff --git a/cookiecutter/config.py b/cookiecutter/config.py
index 42214b8..060e6ca 100644
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -1,6 +1,11 @@
 # -*- coding: utf-8 -*-
 
-"""Global configuration handling."""
+"""
+cookiecutter.config
+-------------------
+
+Global configuration handling
+"""
 
 from __future__ import unicode_literals
 import copy
@@ -20,7 +25,6 @@ USER_CONFIG_PATH = os.path.expanduser('~/.cookiecutterrc')
 
 BUILTIN_ABBREVIATIONS = {
     'gh': 'https://github.com/{0}.git',
-    'gl': 'https://gitlab.com/{0}.git',
     'bb': 'https://bitbucket.org/{0}',
 }
 
@@ -39,27 +43,11 @@ def _expand_path(path):
     return path
 
 
-def merge_configs(default, overwrite):
-    """Recursively update a dict with the key/value pair of another.
-
-    Dict values that are dictionaries themselves will be updated, whilst
-    preserving existing keys.
+def get_config(config_path):
+    """
+    Retrieve the config from the specified path, returning it as a config dict.
     """
-    new_config = copy.deepcopy(default)
-
-    for k, v in overwrite.items():
-        # Make sure to preserve existing items in
-        # nested dicts, for example `abbreviations`
-        if isinstance(v, dict):
-            new_config[k] = merge_configs(default[k], v)
-        else:
-            new_config[k] = v
-
-    return new_config
-
 
-def get_config(config_path):
-    """Retrieve the config from the specified path, returning a config dict."""
     if not os.path.exists(config_path):
         raise ConfigDoesNotExistException
 
@@ -73,7 +61,8 @@ def get_config(config_path):
                 ''.format(config_path, e)
             )
 
-    config_dict = merge_configs(DEFAULT_CONFIG, yaml_dict)
+    config_dict = copy.copy(DEFAULT_CONFIG)
+    config_dict.update(yaml_dict)
 
     raw_replay_dir = config_dict['replay_dir']
     config_dict['replay_dir'] = _expand_path(raw_replay_dir)
@@ -87,7 +76,7 @@ def get_config(config_path):
 def get_user_config(config_file=None, default_config=False):
     """Return the user config as a dict.
 
-    If ``default_config`` is True, ignore ``config_file`` and return default
+    If ``default_config`` is True, ignore ``config_file and return default
     values for the config parameters.
 
     If a path to a ``config_file`` is given, that is different from the default
diff --git a/cookiecutter/exceptions.py b/cookiecutter/exceptions.py
index bb01670..63fa5df 100644
--- a/cookiecutter/exceptions.py
+++ b/cookiecutter/exceptions.py
@@ -47,7 +47,7 @@ class ConfigDoesNotExistException(CookiecutterException):
 class InvalidConfiguration(CookiecutterException):
     """
     Raised if the global configuration file is not valid YAML or is
-    badly constructed.
+    badly contructed.
     """
 
 
diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index 3bdd1e0..4d2f1eb 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -2,20 +2,19 @@
 
 """Functions for generating a project from a project template."""
 from __future__ import unicode_literals
-
+from collections import OrderedDict
 import fnmatch
 import io
 import json
 import logging
 import os
 import shutil
-from collections import OrderedDict
 
-from binaryornot.check import is_binary
 from jinja2 import FileSystemLoader
+from cookiecutter.environment import StrictEnvironment
 from jinja2.exceptions import TemplateSyntaxError, UndefinedError
+from binaryornot.check import is_binary
 
-from .environment import StrictEnvironment
 from .exceptions import (
     NonTemplatedInputDirException,
     ContextDecodingException,
@@ -24,14 +23,15 @@ from .exceptions import (
     UndefinedVariableInTemplate
 )
 from .find import find_template
-from .hooks import run_hook
 from .utils import make_sure_path_exists, work_in, rmtree
+from .hooks import run_hook
 
 logger = logging.getLogger(__name__)
 
 
 def is_copy_only_path(path, context):
-    """Check whether the given `path` should only be copied and not rendered.
+    """Check whether the given `path` should only be copied as opposed to being
+    rendered.
 
     Returns True if `path` matches a pattern in the given `context` dict,
     otherwise False.
@@ -197,19 +197,19 @@ def render_and_create_dir(dirname, context, output_dir, environment,
 
     output_dir_exists = os.path.exists(dir_to_create)
 
-    if output_dir_exists:
-        if overwrite_if_exists:
+    if overwrite_if_exists:
+        if output_dir_exists:
             logger.debug(
                 'Output directory {} already exists,'
                 'overwriting it'.format(dir_to_create)
             )
-        else:
+    else:
+        if output_dir_exists:
             msg = 'Error: "{}" directory already exists'.format(dir_to_create)
             raise OutputDirExistsException(msg)
-    else:
-        make_sure_path_exists(dir_to_create)
 
-    return dir_to_create, not output_dir_exists
+    make_sure_path_exists(dir_to_create)
+    return dir_to_create
 
 
 def ensure_dir_is_templated(dirname):
@@ -220,23 +220,19 @@ def ensure_dir_is_templated(dirname):
         raise NonTemplatedInputDirException
 
 
-def _run_hook_from_repo_dir(repo_dir, hook_name, project_dir, context,
-                            delete_project_on_failure):
+def _run_hook_from_repo_dir(repo_dir, hook_name, project_dir, context):
     """Run hook from repo directory, clean project directory if hook fails.
 
     :param repo_dir: Project template input directory.
     :param hook_name: The hook to execute.
     :param project_dir: The directory to execute the script from.
     :param context: Cookiecutter project context.
-    :param delete_project_on_failure: Delete the project directory on hook
-        failure?
     """
     with work_in(repo_dir):
         try:
             run_hook(hook_name, project_dir, context)
         except FailedHookException:
-            if delete_project_on_failure:
-                rmtree(project_dir)
+            rmtree(project_dir)
             logger.error(
                 "Stopping generation because {} hook "
                 "script didn't exit successfully".format(hook_name)
@@ -265,7 +261,7 @@ def generate_files(repo_dir, context=None, output_dir='.',
         keep_trailing_newline=True,
     )
     try:
-        project_dir, output_directory_created = render_and_create_dir(
+        project_dir = render_and_create_dir(
             unrendered_dir,
             context,
             output_dir,
@@ -286,17 +282,7 @@ def generate_files(repo_dir, context=None, output_dir='.',
     project_dir = os.path.abspath(project_dir)
     logger.debug('Project directory is {}'.format(project_dir))
 
-    # if we created the output directory, then it's ok to remove it
-    # if rendering fails
-    delete_project_on_failure = output_directory_created
-
-    _run_hook_from_repo_dir(
-        repo_dir,
-        'pre_gen_project',
-        project_dir,
-        context,
-        delete_project_on_failure
-    )
+    _run_hook_from_repo_dir(repo_dir, 'pre_gen_project', project_dir, context)
 
     with work_in(template_dir):
         env.loader = FileSystemLoader('.')
@@ -341,8 +327,7 @@ def generate_files(repo_dir, context=None, output_dir='.',
                         overwrite_if_exists
                     )
                 except UndefinedError as err:
-                    if delete_project_on_failure:
-                        rmtree(project_dir)
+                    rmtree(project_dir)
                     _dir = os.path.relpath(unrendered_dir, output_dir)
                     msg = "Unable to create directory '{}'".format(_dir)
                     raise UndefinedVariableInTemplate(msg, err, context)
@@ -363,17 +348,10 @@ def generate_files(repo_dir, context=None, output_dir='.',
                 try:
                     generate_file(project_dir, infile, context, env)
                 except UndefinedError as err:
-                    if delete_project_on_failure:
-                        rmtree(project_dir)
+                    rmtree(project_dir)
                     msg = "Unable to create file '{}'".format(infile)
                     raise UndefinedVariableInTemplate(msg, err, context)
 
-    _run_hook_from_repo_dir(
-        repo_dir,
-        'post_gen_project',
-        project_dir,
-        context,
-        delete_project_on_failure
-    )
+    _run_hook_from_repo_dir(repo_dir, 'post_gen_project', project_dir, context)
 
     return project_dir
diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py
index 631c06a..278d391 100644
--- a/cookiecutter/hooks.py
+++ b/cookiecutter/hooks.py
@@ -138,7 +138,7 @@ def run_hook(hook_name, project_dir, context):
     """
     script = find_hook(hook_name)
     if script is None:
-        logger.debug('No {} hook found'.format(hook_name))
+        logger.debug('No hooks found')
         return
     logger.debug('Running hook {}'.format(hook_name))
     run_script_with_context(script, project_dir, context)
diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index f138cdb..fd3f1e6 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -1,6 +1,9 @@
 # -*- coding: utf-8 -*-
 
 """
+cookiecutter.main
+-----------------
+
 Main entry point for the `cookiecutter` command.
 
 The code in this module is also a good example of how to use Cookiecutter as a
@@ -78,9 +81,6 @@ def cookiecutter(
         # except when 'no-input' flag is set
         context['cookiecutter'] = prompt_for_config(context, no_input)
 
-        # include template dir or url in the context dict
-        context['cookiecutter']['_template'] = template
-
         dump(config_dict['replay_dir'], template_name, context)
 
     # Create project from local context and project template.
diff --git a/cookiecutter/repository.py b/cookiecutter/repository.py
index 0eb9c7c..33e0ba3 100644
--- a/cookiecutter/repository.py
+++ b/cookiecutter/repository.py
@@ -1,7 +1,6 @@
 # -*- coding: utf-8 -*-
 
 """Cookiecutter repository functions."""
-
 from __future__ import unicode_literals
 import os
 import re
@@ -24,7 +23,8 @@ def is_repo_url(value):
 
 
 def expand_abbreviations(template, abbreviations):
-    """Expand abbreviations in a template name.
+    """
+    Expand abbreviations in a template name.
 
     :param template: The project template name.
     :param abbreviations: Abbreviation definitions.
diff --git a/cookiecutter/vcs.py b/cookiecutter/vcs.py
index d855833..3fb44a6 100644
--- a/cookiecutter/vcs.py
+++ b/cookiecutter/vcs.py
@@ -129,12 +129,13 @@ def clone(repo_url, checkout=None, clone_to_dir='.', no_input=False):
                 stderr=subprocess.STDOUT,
             )
     except subprocess.CalledProcessError as clone_error:
-        if 'not found' in clone_error.output.lower():
+        output = clone_error.output.decode('utf-8')
+        if 'not found' in output.lower():
             raise RepositoryNotFound(
                 'The repository {} could not be found, '
                 'have you made a typo?'.format(repo_url)
             )
-        if any(error in clone_error.output for error in BRANCH_ERRORS):
+        if any(error in output for error in BRANCH_ERRORS):
             raise RepositoryCloneFailed(
                 'The {} branch of repository {} could not found, '
                 'have you made a typo?'.format(checkout, repo_url)
diff --git a/logo/cookiecutter_medium.png b/cookiecutter_medium.png
similarity index 100%
rename from logo/cookiecutter_medium.png
rename to cookiecutter_medium.png
diff --git a/docs/advanced/copy_without_render.rst b/docs/advanced/copy_without_render.rst
index a804032..e2b5c1b 100644
--- a/docs/advanced/copy_without_render.rst
+++ b/docs/advanced/copy_without_render.rst
@@ -5,7 +5,7 @@ Copy without Render
 
 *New in Cookiecutter 1.1*
 
-To avoid rendering directories and files of a cookiecutter, the `_copy_without_render` key can be used in the `cookiecutter.json`. The value of this key accepts a list of Unix shell-style wildcards::
+To avoid rendering directories and files of a cookiecutter mould, the `_copy_without_render` key can be used in the `cookiecutter.json`. The value of this key accepts a list of Unix shell-style wildcards::
 
     {
         "project_slug": "sample",
diff --git a/docs/advanced/suppressing_prompts.rst b/docs/advanced/suppressing_prompts.rst
index 1f73ff9..3795c4e 100644
--- a/docs/advanced/suppressing_prompts.rst
+++ b/docs/advanced/suppressing_prompts.rst
@@ -1,4 +1,4 @@
-.. _suppressing-command-line-prompts:
+.. _supressing-command-line-prompts:
 
 Suppressing Command-Line Prompts
 --------------------------------
@@ -19,7 +19,7 @@ Cookiecutter will pick a default value if used with `no_input`::
 In this case it will be using the default defined in `cookiecutter.json` or `.cookiecutterrc`.
 
 .. note::
-   values from `cookiecutter.json` will be overridden by values from  `.cookiecutterrc`
+   values from `cookiecutter.json` will be overriden by values from  `.cookiecutterrc`
 
 Advanced Example: Defaults + Extra Context
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/advanced/user_config.rst b/docs/advanced/user_config.rst
index 96f5008..f6fae93 100644
--- a/docs/advanced/user_config.rst
+++ b/docs/advanced/user_config.rst
@@ -49,5 +49,5 @@ Possible settings are:
   the text `{0}`, using standard Python string formatting.  With the above
   aliases, you could use the `cookiecutter-pypackage` template simply by saying
   `cookiecutter pp`, or `cookiecutter gh:audreyr/cookiecutter-pypackage`.
-  The `gh` (github), `bb` (bitbucket), and `gl` (gitlab) abbreviations shown
-  above are actually built in, and can be used without defining them yourself.
+  The `gh` (github) and `bb` (bitbucket) abbreviations shown above are actually
+  built in, and can be used without defining them yourself.
diff --git a/docs/conf.py b/docs/conf.py
index 2f0d527..1ddf3c5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -62,7 +62,7 @@ import cookiecutter
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx',
-              'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.imgmath',
+              'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath',
               'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'docs.ccext']
 
 # Add any paths that contain templates here, relative to this directory.
@@ -127,8 +127,6 @@ pygments_style = 'sphinx'
 # If true, keep warnings as "system message" paragraphs in the built documents.
 #keep_warnings = False
 
-# Suppress nonlocal image warnings
-suppress_warnings = ['image.nonlocal_uri']
 
 # -- Options for HTML output ---------------------------------------------------
 
diff --git a/docs/contributor_guidelines.rst b/docs/contributor_guidelines.rst
index f0e5268..18081cd 100644
--- a/docs/contributor_guidelines.rst
+++ b/docs/contributor_guidelines.rst
@@ -10,8 +10,7 @@ Before you submit a pull request, check that it meets these guidelines:
 2. If the pull request adds functionality, the docs should be updated. Put
    your new functionality into a function with a docstring, and add the
    feature to the list in README.rst.
-3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, 3.6, and PyPy on
-   Appveyor and Travis CI.
+3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, and PyPy on Appveyor and Travis CI.
 4. Check https://travis-ci.org/audreyr/cookiecutter/pull_requests and 
    https://ci.appveyor.com/project/audreyr/cookiecutter/history to ensure the tests pass for all supported Python versions and platforms.
 
diff --git a/docs/cookiecutter.rst b/docs/cookiecutter.rst
index 9d39673..5f09278 100644
--- a/docs/cookiecutter.rst
+++ b/docs/cookiecutter.rst
@@ -36,14 +36,6 @@ cookiecutter.exceptions module
     :undoc-members:
     :show-inheritance:
 
-cookiecutter.extensions module
-------------------------------
-
-.. automodule:: cookiecutter.extensions
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
 cookiecutter.find module
 ------------------------
 
@@ -68,14 +60,6 @@ cookiecutter.hooks module
     :undoc-members:
     :show-inheritance:
 
-cookiecutter.log module
------------------------
-
-.. automodule:: cookiecutter.log
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
 cookiecutter.main module
 ------------------------
 
diff --git a/docs/core_committer_guide.rst b/docs/core_committer_guide.rst
index 389a091..f208ce1 100644
--- a/docs/core_committer_guide.rst
+++ b/docs/core_committer_guide.rst
@@ -134,8 +134,6 @@ If you merge a pull request, you're responsible for updating `AUTHORS.rst` and `
 
 When you're processing the first change after a release, create boilerplate following the existing pattern:
 
-.. code-block:: rest
-
     x.y.z (Development)
     ~~~~~~~~~~~~~~~~~~~
 
diff --git a/docs/index.rst b/docs/index.rst
index 52b2cd1..0fdd859 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -20,8 +20,6 @@ Basics
    usage
    first_steps
    tutorials
-   tutorial1
-   tutorial2
    advanced/index
    troubleshooting
 
diff --git a/docs/installation.rst b/docs/installation.rst
index 30ed699..135fc80 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -25,13 +25,9 @@ You can install the Python binaries from `python.org <https://www.python.org/dow
 Adjust your path
 ^^^^^^^^^^^^^^^^
 
-Ensure that your ``bin`` folder is on your path for your platform. Typically ``~/.local/`` for UNIX and macOS, or ``%APPDATA%\Python`` on Windows. (See the Python documentation for `site.USER_BASE <https://docs.python.org/3/library/site.html#site.USER_BASE>`_ for full details.)
+Ensure that your ``bin`` folder is on your path for your platform. Typically ``~/.local/`` for UNIX, or ``%APPDATA%\Python`` on Windows. (See the Python documentation for `site.USER_BASE <https://docs.python.org/3/library/site.html#site.USER_BASE>`_ for full details.)
 
-
-UNIX and macOS
-""""""""""""""
-
-For bash shells, add the following to your ``.bash_profile`` (adjust for other shells):
+On UNIX and macOS, for bash shells, add the following to your ``.bash_profile`` (adjust for other shells):
 
 .. code-block:: bash
 
@@ -40,23 +36,19 @@ For bash shells, add the following to your ``.bash_profile`` (adjust for other s
 
 Remember to load changes with ``source ~/.bash_profile`` or open a new shell session.
 
+On Windows, ensure the ``c:\Python3x`` directory is in your environment's ``Path``, where ``x`` is the minor version of installed Python, in order to make it possible to invoke Python from a command prompt by typing ``python``. You will also need to add your ``bin`` folder. To do so:
 
-Windows
-"""""""
-
-Ensure the directory where cookiecutter will be installed is in your environment's ``Path`` in order to make it possible to invoke it from a command prompt. To do so, search for "Environment Variables" on your computer (on Windows 10, it is under ``System Properties`` --> ``Advanced``) and add that directory to the ``Path`` environment variable, using the GUI to edit path segments.
-
-Example segments should look like ``%APPDATA%\Python\Python3x\Scripts``, where you have your version of Python instead of ``Python3x``.
-
-You may need to restart your command prompt session to load the environment variables.
+#. Right click ``My Computer``
+#. Select ``Properties`` --> ``Advanced Tab`` --> ``Environment Variables``
+#. Add each directory to the end of the ``Path`` environment variable, one for your Python interpreter and another for your ``bin`` folder.
 
-.. seealso:: See `Configuring Python (on Windows) <https://docs.python.org/3/using/windows.html#configuring-python>`_ for full details.
+   .. seealso:: See `Configuring Python (on Windows) <https://docs.python.org/3/using/windows.html#configuring-python>`_ for full details.
 
 
 Packaging tools
 ^^^^^^^^^^^^^^^
 
-``pip`` and ``setuptools`` now come with Python 2 >=2.7.9 or Python 3 >=3.4. See the Python Packaging Authority's (PyPA) documentation `Requirements for Installing Packages <https://packaging.python.org/en/latest/installing/#requirements-for-installing-packages>`_ for full details.
+``pip`` and ``setuptools`` now come with Python 2 >=2.7.9 or Python 3 >=3.4. See the Python Packaging Authority's (PyPA) documention `Requirements for Installing Packages <https://packaging.python.org/en/latest/installing/#requirements-for-installing-packages>`_ for full details.
 
 
 Install cookiecutter
diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst
index 2e45a91..66c89e1 100644
--- a/docs/troubleshooting.rst
+++ b/docs/troubleshooting.rst
@@ -30,7 +30,7 @@ See http://jinja.pocoo.org/docs/templates/#escaping for more info.
 You can also use the `_copy_without_render`_ key in your `cookiecutter.json`
 file to escape entire files and directories.
 
-.. _`_copy_without_render`: http://cookiecutter.readthedocs.io/en/latest/advanced/copy_without_render.html
+.. _`_copy_without_render`: http://cookiecutter.readthedocs.io/en/latest/advanced_usage.html#copy-without-render
 
 
 Other common issues
diff --git a/docs/tutorial1.rst b/docs/tutorial1.rst
index 5b4573e..d821bfc 100644
--- a/docs/tutorial1.rst
+++ b/docs/tutorial1.rst
@@ -102,7 +102,7 @@ Step 3: Observe How It Was Generated
 Let's take a look at cookiecutter-pypackage together. Open https://github.com/audreyr/cookiecutter-pypackage in a new browser window.
 
 {{ cookiecutter.project_slug }}
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Find the directory called `{{ cookiecutter.project_slug }}`. Click on it. Observe
 the files inside of it. You should see that this directory and its contents
diff --git a/docs/tutorial2.rst b/docs/tutorial2.rst
index 8302067..57b0c4c 100644
--- a/docs/tutorial2.rst
+++ b/docs/tutorial2.rst
@@ -16,7 +16,7 @@ Create the directory for your cookiecutter and cd into it:
     $ cd cookiecutter-website-simple/
 
 Step 2: Create `project_slug` Directory
----------------------------------------
+-------------------------------------
 
 Create a directory called `{{ cookiecutter.project_slug }}`.
 
diff --git a/docs/usage.rst b/docs/usage.rst
index 0d8b325..79e9bff 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -16,7 +16,7 @@ Modify the variables defined in `cookiecutter.json`.
 
 Open up the skeleton project. If you need to change it around a bit, do so.
 
-You probably also want to create a repo, name it differently, and push it as
+You probably also want to create a repo, name it differently, and push it as 
 your own new Cookiecutter project template, for handy future use.
 
 Generate your project
@@ -42,9 +42,8 @@ To create a project from the cookiecutter-pypackage.git repo template::
 
     $ cookiecutter gh:audreyr/cookiecutter-pypackage
 
-Cookiecutter knows abbreviations for Github (``gh``), Bitbucket (``bb``), and
-GitLab (``gl``) projects, but you can also give it the full URL to any
-repository::
+Cookiecutter knows abbreviations for Github (``gh``) and Bitbucket (``bb``)
+projects, but you can also give it the full URL to any repository::
 
     $ cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git
     $ cookiecutter git+ssh://git@github.com/audreyr/cookiecutter-pypackage.git
@@ -80,7 +79,7 @@ As of the Cookiecutter 0.7.0 release:
 
 * Your cloned cookiecutters are stored by default in your `~/.cookiecutters/`
   directory (or Windows equivalent). The location is configurable: see
-  :doc:`advanced/user_config` for details.
+  :doc:`advanced_usage` for details.
 
 Pre-0.7.0, this is how it worked:
 
diff --git a/setup.cfg b/setup.cfg
index adc6531..7770d2f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,3 @@ ignore = E731
 [bdist_wheel]
 universal = 1
 
-[tool:pytest]
-testpaths = tests
-addopts = --cov=cookiecutter
diff --git a/tox.ini b/tox.ini
index a34bc3c..a113c48 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,11 @@ envlist = py27, py33, py34, py35, py36, pypy, flake8
 [testenv]
 passenv = LC_ALL, LANG, HOME
 commands = pytest --cov=cookiecutter {posargs:tests}
-deps = -rtest_requirements.txt
+deps = pytest
+       pytest-cov
+       pytest-mock==1.1
+       pytest-catchlog
+       freezegun
 
 [testenv:flake8]
 deps =


Test patch:
diff --git a/docs/contributor_testing.rst b/docs/contributor_testing.rst
index 8b1aec5..5790157 100644
--- a/docs/contributor_testing.rst
+++ b/docs/contributor_testing.rst
@@ -44,4 +44,4 @@ Python 3.3 tests fail locally
 Try upgrading Tox to the latest version. I noticed that they were failing
 locally with Tox 1.5 but succeeding when I upgraded to Tox 1.7.1.
 
-.. _`pytest usage docs`: https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests
+.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests
diff --git a/test_requirements.txt b/test_requirements.txt
deleted file mode 100644
index 65a2fa7..0000000
--- a/test_requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-pytest
-pytest-cov
-pytest-mock==1.1
-pytest-catchlog
-freezegun
diff --git a/tests/replay/test_dump.py b/tests/replay/test_dump.py
index c660066..d0715e6 100644
--- a/tests/replay/test_dump.py
+++ b/tests/replay/test_dump.py
@@ -35,7 +35,7 @@ def remove_replay_dump(request, replay_file):
 
 
 def test_type_error_if_no_template_name(replay_test_dir, context):
-    """Test that replay.dump raises if the template_name is not a valid str."""
+    """Test that replay.dump raises if the tempate_name is not a valid str."""
     with pytest.raises(TypeError):
         replay.dump(replay_test_dir, None, context)
 
diff --git a/tests/replay/test_load.py b/tests/replay/test_load.py
index 098b36d..e02480c 100644
--- a/tests/replay/test_load.py
+++ b/tests/replay/test_load.py
@@ -26,7 +26,7 @@ def replay_file(replay_test_dir, template_name):
 
 
 def test_type_error_if_no_template_name(replay_test_dir):
-    """Test that replay.load raises if the template_name is not a valid str."""
+    """Test that replay.load raises if the tempate_name is not a valid str."""
     with pytest.raises(TypeError):
         replay.load(replay_test_dir, None)
 
diff --git a/tests/test-config/valid-config.yaml b/tests/test-config/valid-config.yaml
index 1a10bf5..95150d9 100644
--- a/tests/test-config/valid-config.yaml
+++ b/tests/test-config/valid-config.yaml
@@ -4,5 +4,3 @@ default_context:
     github_username: "example"
 cookiecutters_dir: "/home/example/some-path-to-templates"
 replay_dir: "/home/example/some-path-to-replay-files"
-abbreviations:
-    helloworld: "https://github.com/hackebrot/helloworld"
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 93079cc..a3e1b4f 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -332,8 +332,7 @@ def test_echo_undefined_variable_error(tmpdir, cli_runner):
     context = {
         'cookiecutter': {
             'github_username': 'hackebrot',
-            'project_slug': 'testproject',
-            '_template': template_path
+            'project_slug': 'testproject'
         }
     }
     context_str = json.dumps(context, indent=4, sort_keys=True)
diff --git a/tests/test_generate_files.py b/tests/test_generate_files.py
index 65b582f..f71192f 100644
--- a/tests/test_generate_files.py
+++ b/tests/test_generate_files.py
@@ -239,26 +239,6 @@ def test_raise_undefined_variable_file_name(tmpdir, undefined_context):
     assert not output_dir.join('testproject').exists()
 
 
-def test_raise_undefined_variable_file_name_existing_project(
-        tmpdir, undefined_context):
-    output_dir = tmpdir.mkdir('output')
-
-    output_dir.join('testproject').mkdir()
-
-    with pytest.raises(exceptions.UndefinedVariableInTemplate) as err:
-        generate.generate_files(
-            repo_dir='tests/undefined-variable/file-name/',
-            output_dir=str(output_dir),
-            context=undefined_context,
-            overwrite_if_exists=True
-        )
-    error = err.value
-    assert "Unable to create file '{{cookiecutter.foobar}}'" == error.message
-    assert error.context == undefined_context
-
-    assert output_dir.join('testproject').exists()
-
-
 def test_raise_undefined_variable_file_content(tmpdir, undefined_context):
     output_dir = tmpdir.mkdir('output')
 
@@ -295,30 +275,6 @@ def test_raise_undefined_variable_dir_name(tmpdir, undefined_context):
     assert not output_dir.join('testproject').exists()
 
 
-def test_raise_undefined_variable_dir_name_existing_project(
-        tmpdir, undefined_context):
-    output_dir = tmpdir.mkdir('output')
-
-    output_dir.join('testproject').mkdir()
-
-    with pytest.raises(exceptions.UndefinedVariableInTemplate) as err:
-        generate.generate_files(
-            repo_dir='tests/undefined-variable/dir-name/',
-            output_dir=str(output_dir),
-            context=undefined_context,
-            overwrite_if_exists=True
-        )
-    error = err.value
-
-    directory = os.path.join('testproject', '{{cookiecutter.foobar}}')
-    msg = "Unable to create directory '{}'".format(directory)
-    assert msg == error.message
-
-    assert error.context == undefined_context
-
-    assert output_dir.join('testproject').exists()
-
-
 def test_raise_undefined_variable_project_dir(tmpdir):
     output_dir = tmpdir.mkdir('output')
 
diff --git a/tests/test_generate_hooks.py b/tests/test_generate_hooks.py
index c624265..7617899 100644
--- a/tests/test_generate_hooks.py
+++ b/tests/test_generate_hooks.py
@@ -31,16 +31,12 @@ def remove_additional_folders(request):
     Remove some special folders which are created by the tests.
     """
     def fin_remove_additional_folders():
-        directories_to_delete = [
-            'tests/test-pyhooks/inputpyhooks',
-            'inputpyhooks',
-            'inputhooks',
-            'tests/test-shellhooks',
-            'tests/test-hooks',
-        ]
-        for directory in directories_to_delete:
-            if os.path.exists(directory):
-                utils.rmtree(directory)
+        if os.path.exists('tests/test-pyhooks/inputpyhooks'):
+            utils.rmtree('tests/test-pyhooks/inputpyhooks')
+        if os.path.exists('inputpyhooks'):
+            utils.rmtree('inputpyhooks')
+        if os.path.exists('tests/test-shellhooks'):
+            utils.rmtree('tests/test-shellhooks')
     request.addfinalizer(fin_remove_additional_folders)
 
 
@@ -119,67 +115,6 @@ def test_oserror_hooks(mocker):
     assert message in str(excinfo.value)
 
 
-@pytest.mark.usefixtures('clean_system', 'remove_additional_folders')
-def test_run_failing_hook_removes_output_directory():
-    repo_path = os.path.abspath('tests/test-hooks/')
-    hooks_path = os.path.abspath('tests/test-hooks/hooks')
-
-    hook_dir = os.path.join(repo_path, 'hooks')
-    template = os.path.join(repo_path, 'input{{cookiecutter.hooks}}')
-    os.mkdir(repo_path)
-    os.mkdir(hook_dir)
-    os.mkdir(template)
-
-    hook_path = os.path.join(hooks_path, 'pre_gen_project.py')
-
-    with open(hook_path, 'w') as f:
-        f.write("#!/usr/bin/env python\n")
-        f.write("import sys; sys.exit(1)\n")
-
-    with pytest.raises(FailedHookException) as excinfo:
-        generate.generate_files(
-            context={
-                'cookiecutter': {'hooks': 'hooks'}
-            },
-            repo_dir='tests/test-hooks/',
-            overwrite_if_exists=True
-        )
-
-    assert 'Hook script failed' in str(excinfo.value)
-    assert not os.path.exists('inputhooks')
-
-
-@pytest.mark.usefixtures('clean_system', 'remove_additional_folders')
-def test_run_failing_hook_preserves_existing_output_directory():
-    repo_path = os.path.abspath('tests/test-hooks/')
-    hooks_path = os.path.abspath('tests/test-hooks/hooks')
-
-    hook_dir = os.path.join(repo_path, 'hooks')
-    template = os.path.join(repo_path, 'input{{cookiecutter.hooks}}')
-    os.mkdir(repo_path)
-    os.mkdir(hook_dir)
-    os.mkdir(template)
-
-    hook_path = os.path.join(hooks_path, 'pre_gen_project.py')
-
-    with open(hook_path, 'w') as f:
-        f.write("#!/usr/bin/env python\n")
-        f.write("import sys; sys.exit(1)\n")
-
-    os.mkdir('inputhooks')
-    with pytest.raises(FailedHookException) as excinfo:
-        generate.generate_files(
-            context={
-                'cookiecutter': {'hooks': 'hooks'}
-            },
-            repo_dir='tests/test-hooks/',
-            overwrite_if_exists=True
-        )
-
-    assert 'Hook script failed' in str(excinfo.value)
-    assert os.path.exists('inputhooks')
-
-
 def make_test_repo(name):
     hooks = os.path.join(name, 'hooks')
     template = os.path.join(name, 'input{{cookiecutter.shellhooks}}')
diff --git a/tests/test_get_config.py b/tests/test_get_config.py
index ff5bb1f..0c2968c 100644
--- a/tests/test_get_config.py
+++ b/tests/test_get_config.py
@@ -8,47 +8,6 @@ from cookiecutter.exceptions import (
 )
 
 
-def test_merge_configs():
-    default = {
-        'cookiecutters_dir': '/home/example/some-path-to-templates',
-        'replay_dir': '/home/example/some-path-to-replay-files',
-        'default_context': {},
-        'abbreviations': {
-            'gh': 'https://github.com/{0}.git',
-            'gl': 'https://gitlab.com/{0}.git',
-            'bb': 'https://bitbucket.org/{0}',
-        }
-    }
-
-    user_config = {
-        'default_context': {
-            'full_name': 'Raphael Pierzina',
-            'github_username': 'hackebrot',
-        },
-        'abbreviations': {
-            'gl': 'https://gitlab.com/hackebrot/{0}.git',
-            'pytest-plugin': 'https://github.com/pytest-dev/pytest-plugin.git',
-        }
-    }
-
-    expected_config = {
-        'cookiecutters_dir': '/home/example/some-path-to-templates',
-        'replay_dir': '/home/example/some-path-to-replay-files',
-        'default_context': {
-            'full_name': 'Raphael Pierzina',
-            'github_username': 'hackebrot',
-        },
-        'abbreviations': {
-            'gh': 'https://github.com/{0}.git',
-            'gl': 'https://gitlab.com/hackebrot/{0}.git',
-            'bb': 'https://bitbucket.org/{0}',
-            'pytest-plugin': 'https://github.com/pytest-dev/pytest-plugin.git',
-        }
-    }
-
-    assert config.merge_configs(default, user_config) == expected_config
-
-
 def test_get_config():
     """
     Opening and reading config file
@@ -64,9 +23,7 @@ def test_get_config():
         },
         'abbreviations': {
             'gh': 'https://github.com/{0}.git',
-            'gl': 'https://gitlab.com/{0}.git',
             'bb': 'https://bitbucket.org/{0}',
-            'helloworld': 'https://github.com/hackebrot/helloworld'
         }
     }
     assert conf == expected_conf
@@ -113,7 +70,6 @@ def test_get_config_with_defaults():
         },
         'abbreviations': {
             'gh': 'https://github.com/{0}.git',
-            'gl': 'https://gitlab.com/{0}.git',
             'bb': 'https://bitbucket.org/{0}',
         }
     }
diff --git a/tests/test_get_user_config.py b/tests/test_get_user_config.py
index 8a541f8..2fbea32 100644
--- a/tests/test_get_user_config.py
+++ b/tests/test_get_user_config.py
@@ -69,9 +69,7 @@ def custom_config():
         'replay_dir': '/home/example/some-path-to-replay-files',
         'abbreviations': {
             'gh': 'https://github.com/{0}.git',
-            'gl': 'https://gitlab.com/{0}.git',
             'bb': 'https://bitbucket.org/{0}',
-            'helloworld': 'https://github.com/hackebrot/helloworld',
         }
     }
 
diff --git a/tests/test_prompt.py b/tests/test_prompt.py
index 3b9563b..4d881f6 100644
--- a/tests/test_prompt.py
+++ b/tests/test_prompt.py
@@ -34,7 +34,7 @@ def test_convert_to_str(mocker, raw_var, rendered_var):
     result = prompt.render_variable(env, raw_var, context)
     assert result == rendered_var
 
-    # Make sure that non None non str variables are converted beforehand
+    # Make sure that non None non str variables are conerted beforehand
     if raw_var is not None:
         if not isinstance(raw_var, basestring):
             raw_var = str(raw_var)
diff --git a/tests/test_read_user_dict.py b/tests/test_read_user_dict.py
index 469d4b0..a434b8d 100644
--- a/tests/test_read_user_dict.py
+++ b/tests/test_read_user_dict.py
@@ -90,7 +90,7 @@ def test_should_raise_type_error(mocker):
 
 def test_should_call_prompt_with_process_json(mocker):
     """Test to make sure that process_jon is actually being used
-    to generate a processor for the user input."""
+    to generate a processer for the user input."""
 
     mock_prompt = mocker.patch(
         'cookiecutter.prompt.click.prompt',
diff --git a/tests/vcs/test_clone.py b/tests/vcs/test_clone.py
index b6a1394..efdfa71 100644
--- a/tests/vcs/test_clone.py
+++ b/tests/vcs/test_clone.py
@@ -139,8 +139,11 @@ def test_clone_should_invoke_vcs_command(
 
 
 @pytest.mark.parametrize('error_message', [
-    "fatal: repository 'https://github.com/hackebro/cookiedozer' not found",
-    'hg: abort: HTTP Error 404: Not Found',
+    (
+        "fatal: repository 'https://github.com/hackebro/cookiedozer' "
+        "not found"
+    ).encode('utf-8'),
+    'hg: abort: HTTP Error 404: Not Found'.encode('utf-8'),
 ])
 def test_clone_handles_repo_typo(mocker, clone_dir, error_message):
     """In `clone()`, repository not found errors should raise an
@@ -171,8 +174,11 @@ def test_clone_handles_repo_typo(mocker, clone_dir, error_message):
 
 
 @pytest.mark.parametrize('error_message', [
-    "error: pathspec 'unknown_branch' did not match any file(s) known to git.",
-    "hg: abort: unknown revision 'unknown_branch'!",
+    (
+        "error: pathspec 'unknown_branch' did not match any file(s) known "
+        "to git"
+    ).encode('utf-8'),
+    "hg: abort: unknown revision 'unknown_branch'!".encode('utf-8'),
 ])
 def test_clone_handles_branch_typo(mocker, clone_dir, error_message):
     """In `clone()`, branch not found errors should raise an
@@ -207,7 +213,7 @@ def test_clone_unknown_subprocess_error(mocker, clone_dir):
         'cookiecutter.vcs.subprocess.check_output',
         autospec=True,
         side_effect=[subprocess.CalledProcessError(
-            -1, 'cmd', output='Something went wrong'
+            -1, 'cmd', output='Something went wrong'.encode('utf-8')
         )]
     )