Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save milanvanalderwerelt/9756c3f8545c0b8889462900e4ca780d to your computer and use it in GitHub Desktop.
Save milanvanalderwerelt/9756c3f8545c0b8889462900e4ca780d to your computer and use it in GitHub Desktop.
Part of the Python script created by GenAI
# Save each test step to a separate .bru file
for name, test_step in zip(names, test_steps):
modified_test_step = test_step
for search_pattern, replacement_string in search_replace_pairs:
# Perform the search and replace
modified_test_step = re.sub(search_pattern, replacement_string, modified_test_step)
filename = f'{name}.bru'
with open (filename, 'w') as file:
file.write(modified_tes_step)
print(f'Created file: {filename'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment