コード例 #1
0
 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']
     }
コード例 #2
0
ファイル: test_data.py プロジェクト: ionelmc/coveragepy
 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']
     })
コード例 #3
0
 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']
     })
コード例 #4
0
ファイル: test_data.py プロジェクト: ionelmc/coveragepy
 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']
     })
コード例 #5
0
 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')
コード例 #6
0
 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']
     })
コード例 #7
0
ファイル: test_data.py プロジェクト: ionelmc/coveragepy
 def test_contexts_by_lineno_with_unknown_file(self):
     covdata = CoverageData()
     self.assertDictEqual(covdata.contexts_by_lineno('xyz.py'), {})
コード例 #8
0
 def test_contexts_by_lineno_with_unknown_file(self):
     covdata = CoverageData()
     assert covdata.contexts_by_lineno('xyz.py') == {}
コード例 #9
0
 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'), {})