Last active
December 28, 2015 11:28
-
-
Save unbracketed/7493207 to your computer and use it in GitHub Desktop.
Find all __init__ modules for packages named 'tests' and clear their contents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . \ | |
-path "*/tests/*" \ | |
-type f \ | |
-name "__init__.py" \ | |
-exec sh -c 'echo "" > {}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . \ | |
-path "*/tests/*" | |
-type f | |
-name "*.py" \ | |
\! -name "__init__.py" | |
-execdir git mv "{}" test_"{}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment