Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asking analysis2() to analyze a module that wasn't executed at all results in an exception. #2

Closed
nedbat opened this issue Apr 13, 2009 · 2 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Apr 13, 2009

    source_file, stmts, excluded, missed, missed_display = coverage.analysis2(module)
  File "C:\Python24\Lib\site-packages\coverage\__init__.py", line 44, in <lambda>
    return lambda *a, **kw: call_singleton_method(name, a, kw)
  File "C:\Python24\Lib\site-packages\coverage\__init__.py", line 31, in call_singleton_method
    return getattr(the_coverage, name)(*args, **kwargs)
  File "C:\Python24\Lib\site-packages\coverage\control.py", line 104, in analysis2
    st, ex, m, mf = self.analyze(code_unit)
  File "C:\Python24\Lib\site-packages\coverage\control.py", line 142, in analyze
    execed = self.data.executed_lines(filename)
  File "C:\Python24\Lib\site-packages\coverage\data.py", line 112, in executed_lines
    return self.executed[filename]
KeyError: 'e:\\lehrhaus\\project\\apps\\financial\\models\\discount.py'

@nedbat
Copy link
Owner Author

nedbat commented Apr 14, 2009

Fixed in <<changeset 7a402701069a (bb)>>.

@nedbat nedbat closed this as completed Apr 14, 2009
@nedbat
Copy link
Owner Author

nedbat commented Jun 14, 2009

Removing version: 3.0b1 (automated comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant