How to use make_cleanup_config method in Behave

Best Python code snippet using behave

cleanup.py

Source:cleanup.py Github

copy

Full Screen

...281 "extra_directories": [],282 "extra_files": [],283 "use_cleanup_python": False,284}285def make_cleanup_config(**kwargs):286 config_data = CLEANUP_EMPTY_CONFIG.copy()287 config_data.update(kwargs)288 return config_data289namespace = Collection(clean_all, clean_python)290namespace.add_task(clean, default=True)291namespace.add_task(git_clean)292namespace.configure({293 "cleanup": make_cleanup_config(294 files=["**/*.bak", "**/*.log", "**/*.tmp", "**/.DS_Store"],295 ),296 "cleanup_all": make_cleanup_config(297 directories=[".venv*", ".tox", "downloads", "tmp"],298 ),299 "git_clean": {300 "interactive": True,301 "force": False,302 "path": ".",303 "dry_run": False,304 },305})306# -- EXTENSION-POINT: CLEANUP TASKS (called by: clean, clean_all task)307# NOTE: Can be used by other tasklets to register cleanup tasks.308cleanup_tasks = Collection("cleanup_tasks")309cleanup_all_tasks = Collection("cleanup_all_tasks")310# -- EXTEND NORMAL CLEANUP-TASKS:...

Full Screen

Full Screen

invoke_cleanup.py

Source:invoke_cleanup.py Github

copy

Full Screen

...267 "extra_directories": [],268 "extra_files": [],269 "use_cleanup_python": False,270}271def make_cleanup_config(**kwargs):272 config_data = CLEANUP_EMPTY_CONFIG.copy()273 config_data.update(kwargs)274 return config_data275namespace = Collection(clean_all, clean_python)276namespace.add_task(clean, default=True)277namespace.add_task(git_clean)278namespace.configure({279 "cleanup": make_cleanup_config(280 files=["**/*.bak", "**/*.log", "**/*.tmp", "**/.DS_Store"],281 ),282 "cleanup_all": make_cleanup_config(283 directories=[".venv*", ".tox", "downloads", "tmp"],284 ),285 "git_clean": {286 "interactive": True,287 "force": False,288 "path": ".",289 "dry_run": False,290 },291})292# -- EXTENSION-POINT: CLEANUP TASKS (called by: clean, clean_all task)293# NOTE: Can be used by other tasklets to register cleanup tasks.294cleanup_tasks = Collection("cleanup_tasks")295cleanup_all_tasks = Collection("cleanup_all_tasks")296# -- EXTEND NORMAL CLEANUP-TASKS:...

Full Screen

Full Screen

_tasklet_cleanup.py

Source:_tasklet_cleanup.py Github

copy

Full Screen

...206 "files": [],207 "extra_directories": [],208 "extra_files": [],209}210def make_cleanup_config(**kwargs):211 config_data = CLEANUP_EMPTY_CONFIG.copy()212 config_data.update(kwargs)213 return config_data214namespace = Collection(clean_all, clean_python)215namespace.add_task(clean, default=True)216namespace.configure({217 "cleanup": make_cleanup_config(218 files=["*.bak", "*.log", "*.tmp", "**/.DS_Store", "**/*.~*~"]219 ),220 "cleanup_all": make_cleanup_config(221 directories=[".venv*", ".tox", "downloads", "tmp"]222 ),223 # -- BACKWARD-COMPATIBLE: OLD-STYLE224 "clean": CLEANUP_EMPTY_CONFIG.copy(),225 "clean_all": CLEANUP_EMPTY_CONFIG.copy(),226})227# -- EXTENSION-POINT: CLEANUP TASKS (called by: clean, clean_all task)228# NOTE: Can be used by other tasklets to register cleanup tasks.229cleanup_tasks = Collection("cleanup_tasks")230cleanup_all_tasks = Collection("cleanup_all_tasks")231# -- EXTEND NORMAL CLEANUP-TASKS:232# DISABLED: cleanup_tasks.add_task(clean_python)233#234# -----------------------------------------------------------------------------...

Full Screen

Full Screen

test_task_cleanup_all.py

Source:test_task_cleanup_all.py Github

copy

Full Screen

...18 "echo": True,19 "pty": False,20 "dry": False,21 },22 "cleanup": make_cleanup_config(),23 "cleanup_all": make_cleanup_config(24 dirs=["**/zzz"],25 files=["*.tmp"],26 ),27})28DEFAULT_KWARGS = dict(workdir=".", verbose=False)29# ---------------------------------------------------------------------------30# TEST SUITE31# ---------------------------------------------------------------------------32not_implemented = pytest.mark.skip(reason="Not implemented yet")33class TestCleanAllTask(object):34 """Test configuration logic of :func:`clean_all()` tasks with Mocks.35 Therefore, no file removal occurs here.36 """37 @pytest.mark.parametrize("mode", ["normal", "dry_run"])...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Behave automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful