File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,24 @@ def test_cookiecutter_local_with_input(self):
8888 self .assertTrue (os .path .isfile ('fake-project/README.rst' ))
8989 self .assertFalse (os .path .exists ('fake-project/json/' ))
9090
91+ @patch (input_str , lambda x : '\n ' )
92+ def test_cookiecutter_input_extra_context (self ):
93+ """ `Call cookiecutter()` with `no_input=False` and `extra_context` """
94+ if not PY3 :
95+ sys .stdin = StringIO ("\n \n \n \n \n \n \n \n \n \n \n \n " )
96+
97+ main .cookiecutter (
98+ 'tests/fake-repo-pre' ,
99+ no_input = True ,
100+ extra_context = {'repo_name' : 'fake-project-input-extra' }
101+ )
102+ self .assertTrue (os .path .isdir ('fake-project-input-extra' ))
103+
91104 def tearDown (self ):
92105 if os .path .isdir ('fake-project' ):
93106 utils .rmtree ('fake-project' )
107+ if os .path .isdir ('fake-project-input-extra' ):
108+ utils .rmtree ('fake-project-input-extra' )
94109
95110
96111class TestArgParsing (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments