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

Method test_filename_leading_dot

Lib/test/test_mailbox.py:691–703  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

689 self._check_basics()
690
691 def test_filename_leading_dot(self):
692 self.tearDown()
693 for subdir in '', 'tmp', 'new', 'cur':
694 os.mkdir(os.path.normpath(os.path.join(self._path, subdir)))
695 for subdir in 'tmp', 'new', 'cur':
696 fname = os.path.join(self._path, subdir, '.foo' + subdir)
697 with open(fname, 'wb') as f:
698 f.write(b"@")
699 self._box = mailbox.Maildir(self._path)
700 self.assertNotIn('.footmp', self._box)
701 self.assertNotIn('.foonew', self._box)
702 self.assertNotIn('.foocur', self._box)
703 self.assertEqual(list(self._box.iterkeys()), [])
704
705 def _check_basics(self, factory=None):
706 # (Used by test_open_new() and test_open_existing().)

Callers

nothing calls this directly

Calls 9

listClass · 0.85
assertNotInMethod · 0.80
openFunction · 0.50
tearDownMethod · 0.45
mkdirMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45
assertEqualMethod · 0.45
iterkeysMethod · 0.45

Tested by

no test coverage detected