Thank you
esper and anonymonk. It turns out my test cases were wrong. (I had hand-edited the test data at one point to work on a few failing cases, and I didn't undo my changes properly.) I went back to my original case file and now every one of my tests passes.