1. Mariano Mara
  2. WebObTestCoverage
  3. Issues
Issue #5 resolved

Impossible to enter a conditional branch in from_file method

Mariano Mara
repo owner created an issue

I have a similar situation to the one reported by Danny here [1] in webob/request.py (classmethod from_file, line 874-875). The strip() method prevents from entering the following if and so the reported lines are not coverable. I invested quite some time trying to think how to make it work to no avail.

If you have time, please take a look to see if you agree with this so we can remove the code in request.py

[1] https://bitbucket.org/marplatense/webobtestcoverage/changeset/74df45a4888c

Comments (7)

  1. Sergey Schetinin
    • changed status to open

    I've never seen multiline headers in HTTP anyway, so yeah, I think it's absolutely safe to remove that code. While you're at it, I think it would make code cleaner and shorter if the `headers = {}` was replaced w/ `headerlist = []`.

  2. Log in to comment