jmvrbanac/Specter

Issue with cross-module fixtures

jmvrbanac opened this issue · 1 comments

Attempting to use a fixture from another module is causing an odd traceback. However, if I move the fixture into the module I want to use it in, the error goes away and it works just fine.

 Error Traceback:
          - /home/john/Repositories/github/requests-cloud/spec/keystone.pyc
          ------------------
          ------------------
          - /home/john/.virtualenvs/cloudauth/lib/python2.7/site-packages/specter/expect.py
          ------------------
            161:     """
            162:     src_line = get_called_src_line(use_child_attr='__spec__')
        --> 163:     src_params = get_expect_param_strs(src_line)
            164:     expect_obj = ExpectAssert(obj, src_params=src_params,
          ------------------
          - /home/john/.virtualenvs/cloudauth/lib/python2.7/site-packages/specter/util.py
          ------------------
            38: def get_expect_param_strs(src_line):
        --> 39:     matches = re.search('\((.*?)\)\..*\((.*?)\)', src_line)
            40:     return (matches.group(1), matches.group(2)) if matches else None
          ------------------
          - /home/john/.virtualenvs/cloudauth/lib/python2.7/re.py
          ------------------
            140:     """Scan through string looking for a match to the pattern, returning
            141:     a match object, or None if no match was found."""
        --> 142:     return _compile(pattern, flags).search(string)
          ------------------
          - Error | TypeError: expected string or buffer

Cannot currently replicate. Closing for now.