Skip to content

Instantly share code, notes, and snippets.

@coagulant
Created January 10, 2015 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coagulant/369f808a94821eec0323 to your computer and use it in GitHub Desktop.
Save coagulant/369f808a94821eec0323 to your computer and use it in GitHub Desktop.
_______________________________________________________________________________________ ReporterTest.test_reporter _______________________________________________________________________________________
self = <tests.test_api.ReporterTest testMethod=test_reporter>
def test_reporter(self):
sh.coverage('run', 'runtests.py')
> assert self.cover.get_coverage() == [{
'source': '# coding: utf-8\n\n\ndef hello():\n print(\'world\')\n\n\nclass Foo(object):\n """ Bar """\n\n\ndef baz():\n print(\'this is not tested\')',
'name': 'project.py',
'coverage': [None, None, None, 1, 1, None, None, 1, None, None, None, 1, 0]}, {
'source': "# coding: utf-8\nfrom project import hello\n\nif __name__ == '__main__':\n hello()",
'name': 'runtests.py', 'coverage': [None, 1, None, 1, 1]}]
E AssertionError: assert [{'coverage':... hello()\n'}] == [{'coverage': ... hello()"}]
E At index 0 diff: {'coverage': [None, None, None, 1, 1, None, None, 1, None, None, None, 1, 0, None], 'source': u'# coding: utf-8\n\n\ndef hello():\n print(\'world\')\n\n\nclass Foo(object):\n """ Bar """\n\n\ndef baz():\n print(\'this is not tested\')\n', 'name': 'project.py'} != {u'coverage': [None, None, None, 1, 1, None, None, 1, None, None, None, 1, 0], u'source': u'# coding: utf-8\n\n\ndef hello():\n print(\'world\')\n\n\nclass Foo(object):\n """ Bar """\n\n\ndef baz():\n print(\'this is not tested\')', u'name': u'project.py'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment