Non-existent filename triggers AttributeError. · Issue #153 · nedbat/coveragepy (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@nedbat

Description

@nedbat

Originally reported by Julian O (Bitbucket: oddthinking, GitHub: oddthinking)


Running coverage on a non-existent file gives a meaningful error message, and then signs off with an unexpected exception report.

I hope the following test case says it all:

> coverage run a_file_that_does_not_exist
No file to run: 'a_file_that_does_not_exist'
Exception AttributeError: "'NoneType' object has no attribute 'isabs'" in <function _remove at 0x026E23F0> ignored

> ver
Microsoft Windows [Version 6.0.6002]

> python --version
Python 2.7.1

> coverage --version
Coverage.py, version 3.5.1.  http://nedbatchelder.com/code/coverage

Obviously, this isn't a big problem, but worth noting.