Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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

  • 07-06-2024 12:01PM
    #1
    Registered Users, Registered Users 2 Posts: 5,755 ✭✭✭


    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