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

Method test_base

Lib/idlelib/idle_test/test_grep.py:67–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 os.chdir(save_cwd)
66
67 def test_base(self):
68 ff = grep.findfiles
69 readme = os.path.join(self.path, 'README.txt')
70
71 # Check for Python files in path where this file lives.
72 filelist = list(ff(self.path, '*.py', False))
73 # This directory has many Python files.
74 self.assertGreater(len(filelist), 10)
75 self.assertIn(self.realpath, filelist)
76 self.assertNotIn(readme, filelist)
77
78 # Look for .txt files in path where this file lives.
79 filelist = list(ff(self.path, '*.txt', False))
80 self.assertNotEqual(len(filelist), 0)
81 self.assertNotIn(self.realpath, filelist)
82 self.assertIn(readme, filelist)
83
84 # Look for non-matching pattern.
85 filelist = list(ff(self.path, 'grep.*', False))
86 self.assertEqual(len(filelist), 0)
87 self.assertNotIn(self.realpath, filelist)
88
89 def test_recurse(self):
90 ff = grep.findfiles

Callers

nothing calls this directly

Calls 8

listClass · 0.85
ffFunction · 0.85
assertGreaterMethod · 0.80
assertInMethod · 0.80
assertNotInMethod · 0.80
assertNotEqualMethod · 0.80
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected