def test_contexts_by_lineno_with_lines(self): covdata = CoverageData() covdata.set_context('test_a') covdata.add_lines(LINES_1) assert covdata.contexts_by_lineno('a.py') == { 1: ['test_a'], 2: ['test_a'] }
def test_contexts_by_lineno_with_lines(self): covdata = CoverageData() covdata.set_context('test_a') covdata.add_lines(LINES_1) self.assertDictEqual(covdata.contexts_by_lineno('a.py'), { 1: ['test_a'], 2: ['test_a'] })
def test_contexts_by_lineno_with_lines(self): self.skip_unless_data_storage_is("sql") covdata = CoverageData() covdata.set_context('test_a') covdata.add_lines(LINES_1) self.assertDictEqual(covdata.contexts_by_lineno('a.py'), { 1: ['test_a'], 2: ['test_a'] })
def test_contexts_by_lineno_with_arcs(self): covdata = CoverageData() covdata.set_context('test_x') covdata.add_arcs(ARCS_3) self.assertDictEqual(covdata.contexts_by_lineno('x.py'), { -1: ['test_x'], 1: ['test_x'], 2: ['test_x'], 3: ['test_x'] })
def test_contexts_by_lineno_with_arcs(self): covdata = CoverageData() covdata.set_context('test_x') covdata.add_arcs(ARCS_3) expected = { -1: ['test_x'], 1: ['test_x'], 2: ['test_x'], 3: ['test_x'] } assert expected == covdata.contexts_by_lineno('x.py')
def test_contexts_by_lineno_with_arcs(self): self.skip_unless_data_storage_is("sql") covdata = CoverageData() covdata.set_context('test_x') covdata.add_arcs(ARCS_3) self.assertDictEqual(covdata.contexts_by_lineno('x.py'), { -1: ['test_x'], 1: ['test_x'], 2: ['test_x'], 3: ['test_x'] })
def test_contexts_by_lineno_with_unknown_file(self): covdata = CoverageData() self.assertDictEqual(covdata.contexts_by_lineno('xyz.py'), {})
def test_contexts_by_lineno_with_unknown_file(self): covdata = CoverageData() assert covdata.contexts_by_lineno('xyz.py') == {}
def test_contexts_by_lineno_with_unknown_file(self): self.skip_unless_data_storage_is("sql") covdata = CoverageData() self.assertDictEqual(covdata.contexts_by_lineno('xyz.py'), {})