29
29
from ctf_cli .common_environment import common_environment_py_header
30
30
from ctf_cli import __path__
31
31
32
+
32
33
class BehaveTestsConfig (object ):
33
34
"""
34
35
Configuration parser for tests configuration
@@ -219,8 +220,8 @@ def _add_project_specific_steps(self):
219
220
"""
220
221
project_steps_dir = os .path .join (self ._project_tests_dir , 'steps' )
221
222
if os .path .exists (project_steps_dir ):
222
- logger .info ("Using project specific Steps from '%s'" , project_steps_dir . replace ( self . _execution_dir
223
- + os .sep , '' ))
223
+ logger .info ("Using project specific Steps from '%s'" ,
224
+ project_steps_dir . replace ( self . _execution_dir + os .sep , '' ))
224
225
shutil .copytree (project_steps_dir , os .path .join (self ._steps_dir ,
225
226
'{0}_steps' .format (os .path .basename (
226
227
self ._execution_dir ).replace ('-' , '_' ))))
@@ -237,8 +238,8 @@ def _add_project_specific_features(self):
237
238
"""
238
239
project_features_dir = os .path .join (self ._project_tests_dir , 'features' )
239
240
if os .path .exists (project_features_dir ):
240
- logger .info ("Using project specific Features from '%s'" , project_features_dir . replace ( self . _execution_dir
241
- + os .sep , '' ))
241
+ logger .info ("Using project specific Features from '%s'" ,
242
+ project_features_dir . replace ( self . _execution_dir + os .sep , '' ))
242
243
shutil .copytree (project_features_dir , os .path .join (self ._features_dir ,
243
244
'{0}_features' .format (os .path .basename (
244
245
self ._execution_dir ).replace ('-' , '_' ))))
@@ -324,7 +325,7 @@ def get_import_statements(path):
324
325
"""
325
326
imports = []
326
327
327
- for (dirpath , dirnames , filenames ) in os .walk (path , followlinks = True ):
328
+ for (dirpath , _ , filenames ) in os .walk (path , followlinks = True ):
328
329
module = dirpath .replace (path , '' ).strip (os .sep ).replace (os .sep , '.' )
329
330
# generate imports for the *.py files in the current dir
330
331
@@ -356,7 +357,7 @@ def check_and_add_init_py(path, skip_root=False):
356
357
"""
357
358
files = []
358
359
359
- for (dirpath , dirnames , filenames ) in os .walk (path , followlinks = True ):
360
+ for (dirpath , _ , filenames ) in os .walk (path , followlinks = True ):
360
361
if skip_root and dirpath == path :
361
362
continue
362
363
0 commit comments