extract-partitions test coverage 99%, pylint+pep8 on script+test_methods

a. Test methods added to test all logic flows in extract-partitions.py
b. pylint warnings addressed in script and test methods
c. pep8 conformity ensured in script and test methods