MCPcopy Index your code
hub / github.com/python/cpython / test_ignored

Method test_ignored

Lib/test/test_trace.py:440–449  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

438### regrtest is invoked with -T option.
439class Test_Ignore(unittest.TestCase):
440 def test_ignored(self):
441 jn = os.path.join
442 ignore = trace._Ignore(['x', 'y.z'], [jn('foo', 'bar')])
443 self.assertTrue(ignore.names('x.py', 'x'))
444 self.assertFalse(ignore.names('xy.py', 'xy'))
445 self.assertFalse(ignore.names('y.py', 'y'))
446 self.assertTrue(ignore.names(jn('foo', 'bar', 'baz.py'), 'baz'))
447 self.assertFalse(ignore.names(jn('bar', 'z.py'), 'z'))
448 # Matched before.
449 self.assertTrue(ignore.names(jn('bar', 'baz.py'), 'baz'))
450
451# Created for Issue 31908 -- CLI utility not writing cover files
452class TestCoverageCommandLineOutput(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
assertFalseMethod · 0.80
jnFunction · 0.50
namesMethod · 0.45

Tested by

no test coverage detected