@@ -70,25 +70,29 @@ def test_plonecli_test():
7070 context .obj ["target_dir" ] = os .path .dirname (os .path .abspath ("bobtemplate.cfg" ))
7171
7272 test_command_result_a = runner .invoke (
73- cli .run_test , args = ["--all" ], obj = context .obj ,
73+ cli .run_test ,
74+ args = ["--all" ],
75+ obj = context .obj ,
7476 )
75- assert u "\n RUN: ./bin/test --all" in test_command_result_a .output
77+ assert "\n RUN: ./bin/test --all" in test_command_result_a .output
7678
7779 test_command_result_t_a = runner .invoke (
7880 cli .run_test ,
7981 args = ["-t src/collective/todo/tests/test_robot.py" , "-a" ],
8082 obj = context .obj ,
8183 )
8284 assert (
83- u "./bin/test --test src/collective/todo/tests/test_robot.py --all"
85+ "./bin/test --test src/collective/todo/tests/test_robot.py --all"
8486 in test_command_result_t_a .output
8587 ) # NOQA: E501
8688
8789 test_command_result_s_a = runner .invoke (
88- cli .run_test , args = ["-s collective.todo" , "-a" ], obj = context .obj ,
90+ cli .run_test ,
91+ args = ["-s collective.todo" , "-a" ],
92+ obj = context .obj ,
8993 )
9094 assert (
91- u "./bin/test --package collective.todo --all"
95+ "./bin/test --package collective.todo --all"
9296 in test_command_result_s_a .output
9397 ) # NOQA: E501
9498
@@ -98,7 +102,7 @@ def test_plonecli_test():
98102 obj = context .obj ,
99103 )
100104 assert (
101- u "./bin/test --test src/collective/todo/tests/test_robot.py --package collective.todo"
105+ "./bin/test --test src/collective/todo/tests/test_robot.py --package collective.todo"
102106 in test_command_result_t_s .output
103107 ) # NOQA: E501
104108
@@ -112,7 +116,7 @@ def test_plonecli_test():
112116 obj = context .obj ,
113117 )
114118 assert (
115- u "./bin/test --test src/collective/todo/tests/test_robot.py --package collective.todo --all"
119+ "./bin/test --test src/collective/todo/tests/test_robot.py --package collective.todo --all"
116120 in test_command_result .output
117121 ) # NOQA: E501
118122
@@ -142,7 +146,7 @@ def test_plonecli_build_default_py(tmpdir, plonecli_bin):
142146 with open ("bobtemplate.cfg" , "w" ) as f :
143147 f .write (template )
144148 result = subprocess .check_output ([plonecli_bin , "build" ], cwd = target_path )
145- assert u "\n RUN: python3 -m venv venv" in result .decode ()
149+ assert "\n RUN: python3 -m venv venv" in result .decode ()
146150
147151
148152@pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "requires explicitly python3.7" )
@@ -171,9 +175,10 @@ def test_plonecli_build_py_option(tmpdir, plonecli_bin):
171175 f .write (template )
172176
173177 result = subprocess .check_output (
174- [plonecli_bin , "build" , "-p" , "python3" ], cwd = target_path ,
178+ [plonecli_bin , "build" , "-p" , "python3" ],
179+ cwd = target_path ,
175180 )
176- assert u "\n RUN: python3 -m venv venv" in result .decode ()
181+ assert "\n RUN: python3 -m venv venv" in result .decode ()
177182
178183
179184@pytest .mark .skipif (sys .version_info < (3 , 0 ), reason = "requires python3" )
@@ -203,32 +208,3 @@ def test_plonecli_build_py_conf(tmpdir, plonecli_bin):
203208
204209 result = subprocess .check_output ([plonecli_bin , "build" ], cwd = target_path )
205210 assert "\n RUN: python3 -m venv venv" in result .decode ()
206-
207-
208- @pytest .mark .skipif (sys .version_info < (3 , 0 ), reason = "requires python3" )
209- def test_plonecli_build_target_py27 (tmpdir , plonecli_bin ):
210- target_path = tmpdir .strpath
211- os .chdir (target_path )
212- template = """
213- setuptools==40.8.0
214- zc.buildout==2.13.1
215- """
216- with open ("requirements.txt" , "w" ) as f :
217- f .write (template )
218-
219- template = """[buildout]
220- parts =
221- """
222- with open ("buildout.cfg" , "w" ) as f :
223- f .write (template )
224-
225- template = """[main]
226- version = 5.2.2
227- template = plone_addon
228- python = python2.7
229- """
230- with open ("bobtemplate.cfg" , "w" ) as f :
231- f .write (template )
232-
233- result = subprocess .check_output ([plonecli_bin , "build" ], cwd = target_path )
234- assert "\n RUN: virtualenv -p python2.7 venv" in result .decode ()
0 commit comments