Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Short script to find the intersection of your requirements and test requirements
#!/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
You can’t perform that action at this time.