Created
December 7, 2016 22:55
-
-
Save etoews/c87cb69dd5a33644c564fcd585db8917 to your computer and use it in GitHub Desktop.
Short script to find the intersection of your requirements and test requirements
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
#!/usr/bin/env python | |
requirements = set() | |
test_requirements = set() | |
with open('requirements.txt') as f: | |
for line in f: | |
requirements.add(line.split('==')[0]) | |
with open('tests/test-requirements.txt') as f: | |
for line in f: | |
test_requirements.add(line.split('==')[0]) | |
print requirements.intersection(test_requirements) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment