-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hacky script to help separate tests with dev dependencies
- Loading branch information
1 parent
bdec3ca
commit 4b7342b
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
# write all imports that are in non-external-named test files | ||
grep "import " tests/*.py | grep -v "external" > .test_external_deps_imports | ||
# ls tests/*.py | grep -v external | xargs cat | grep "import " | sort | uniq > .test_external_deps_imports | ||
|
||
# # go through every value in this and grep | ||
> .test_external_deps_overlap | ||
for i in `poetry show -T --only dev | tr '-' '_' | awk '{print $1}'`; do | ||
grep $i .test_external_deps_imports >> .test_external_deps_overlap | ||
done; | ||
|
||
cat .test_external_deps_overlap | grep -v "\bpytest\b" | sort | uniq | ||
rm -f .test_external_deps_imports .test_external_deps_overlap |
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