MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_filename_leading_dot

Method test_filename_leading_dot

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

Source from the content-addressed store, hash-verified

683 self._check_basics()
684
685 def test_filename_leading_dot(self):
686 self.tearDown()
687 for subdir in '', 'tmp', 'new', 'cur':
688 os.mkdir(os.path.normpath(os.path.join(self._path, subdir)))
689 for subdir in 'tmp', 'new', 'cur':
690 fname = os.path.join(self._path, subdir, '.foo' + subdir)
691 with open(fname, 'wb') as f:
692 f.write(b"@")
693 self._box = mailbox.Maildir(self._path)
694 self.assertNotIn('.footmp', self._box)
695 self.assertNotIn('.foonew', self._box)
696 self.assertNotIn('.foocur', self._box)
697 self.assertEqual(list(self._box.iterkeys()), [])
698
699 def _check_basics(self, factory=None):
700 # (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