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

Method test_move_into

Lib/test/test_pathlib/test_pathlib.py:1762–1771  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1760 self.test_move_dangling_symlink()
1761
1762 def test_move_into(self):
1763 base = self.cls(self.base)
1764 source = base / 'fileA'
1765 source_text = source.read_text()
1766 target_dir = base / 'dirA'
1767 result = source.move_into(target_dir)
1768 self.assertEqual(result, target_dir / 'fileA')
1769 self.assertFalse(source.exists())
1770 self.assertTrue(result.exists())
1771 self.assertEqual(source_text, result.read_text())
1772
1773 @patch_replace
1774 def test_move_into_other_os(self):

Callers 1

Calls 7

move_intoMethod · 0.80
assertFalseMethod · 0.80
assertTrueMethod · 0.80
clsMethod · 0.45
read_textMethod · 0.45
assertEqualMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected