doolin/patentprocessor — pull request #1 by alvinchang (2012-05-26 21:46:19+00:00)
Title: Changes to test_xml_patent.py

Changes to test_xml_patent.py:
- Added a constructor test for each patent at a high level
- Added tests to determine reasonableness of certain patent fields at a medium level (ex. date_applied = 20121234 needs to be all numbers as well as 8 numbers long)
- Added basic xml detection of the fields at a lower level (if date_applied = 20121234, there needs to be a 20121234 (still working on this)
- Added a command-line argument (-d), when you run python test_xml_patent.py -d it will print out some debugging statements, might be useful for me in the future
- Added some spliced XML into separate xml files for unit-testing
- Added comments to show thought process

Plans:
- Make test file detection automatic, with a os.listdir() re.match("test-file-name") for now its done manually (test_files.append(test1... test2... )) but will change it soon.
- Make XML detection more robust and accurate
- Implement logging and statistics (yaml?)
- Improve efficiency
- Improve style and readability
- Improve many other things