Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions
test.test_os.LinkTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_link
def test_link_bytes
def test_unicode_name

Public Attributes

 file1
 file2

Private Member Functions

def _test_link

Detailed Description

Definition at line 805 of file test_os.py.


Member Function Documentation

def test.test_os.LinkTests._test_link (   self,
  file1,
  file2 
) [private]

Definition at line 815 of file test_os.py.

00815 
00816     def _test_link(self, file1, file2):
00817         with open(file1, "w") as f1:
00818             f1.write("test")
00819 
00820         os.link(file1, file2)
00821         with open(file1, "r") as f1, open(file2, "r") as f2:
00822             self.assertTrue(os.path.sameopenfile(f1.fileno(), f2.fileno()))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 806 of file test_os.py.

00806 
00807     def setUp(self):
00808         self.file1 = support.TESTFN
00809         self.file2 = os.path.join(support.TESTFN + "2")

Here is the caller graph for this function:

Definition at line 810 of file test_os.py.

00810 
00811     def tearDown(self):
00812         for file in (self.file1, self.file2):
00813             if os.path.exists(file):
00814                 os.unlink(file)

Here is the caller graph for this function:

Definition at line 823 of file test_os.py.

00823 
00824     def test_link(self):
00825         self._test_link(self.file1, self.file2)

Here is the call graph for this function:

Definition at line 826 of file test_os.py.

00826 
00827     def test_link_bytes(self):
00828         self._test_link(bytes(self.file1, sys.getfilesystemencoding()),
00829                         bytes(self.file2, sys.getfilesystemencoding()))

Here is the call graph for this function:

Definition at line 830 of file test_os.py.

00830 
00831     def test_unicode_name(self):
00832         try:
00833             os.fsencode("\xf1")
00834         except UnicodeError:
00835             raise unittest.SkipTest("Unable to encode for this platform.")
00836 
00837         self.file1 += "\xf1"
00838         self.file2 = self.file1 + "2"
00839         self._test_link(self.file1, self.file2)

Here is the call graph for this function:


Member Data Documentation

Definition at line 807 of file test_os.py.

Definition at line 808 of file test_os.py.


The documentation for this class was generated from the following file: