Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Bash command to find all places we do log.test_setup inside a test_ function and replace it

Options
  • 07-06-2024 12:01pm
    #1
    Registered Users Posts: 5,553 ✭✭✭


    I use something like the below to replace test_setup with log.test_step but it appears to do it everywhere, not just inside the def test_ functions

    find . -name '*.py' -exec awk '/def test_/{f=1} /def /&&!/def test_/{f=0} f && /log\.test_setup/ {print FILENAME ": " $0}' {}



Comments

Advertisement