Skip to content

Commit 3fcf3bc

Browse files
committed
Test cookiecutter() with no_input+extra_context.
1 parent 055d2bd commit 3fcf3bc

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,20 @@ def test_cookiecutter_no_slash(self):
5858
self.assertTrue(os.path.isfile('fake-project/README.rst'))
5959
self.assertFalse(os.path.exists('fake-project/json/'))
6060

61+
def test_cookiecutter_no_input_extra_context(self):
62+
""" `Call cookiecutter()` with `no_input=True` and `extra_context` """
63+
main.cookiecutter(
64+
'tests/fake-repo-pre',
65+
no_input=True,
66+
extra_context={'repo_name': 'fake-project-extra'}
67+
)
68+
self.assertTrue(os.path.isdir('fake-project-extra'))
69+
6170
def tearDown(self):
6271
if os.path.isdir('fake-project'):
6372
utils.rmtree('fake-project')
73+
if os.path.isdir('fake-project-extra'):
74+
utils.rmtree('fake-project-extra')
6475

6576

6677
class TestCookiecutterLocalWithInput(CookiecutterCleanSystemTestCase):

0 commit comments

Comments
 (0)