Skip to content

Instantly share code, notes, and snippets.

@etoews
Created December 7, 2016 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etoews/c87cb69dd5a33644c564fcd585db8917 to your computer and use it in GitHub Desktop.
Save etoews/c87cb69dd5a33644c564fcd585db8917 to your computer and use it in GitHub Desktop.
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