Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
test.test_import.PathsTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_trailing_slash

Public Attributes

 syspath

Static Public Attributes

tuple SAMPLES
 path = TESTFN
 test_UNC_path = _test_UNC_path

Private Member Functions

def _test_UNC_path

Detailed Description

Definition at line 396 of file test_import.py.


Member Function Documentation

Definition at line 419 of file test_import.py.

00419 
00420     def _test_UNC_path(self):
00421         with open(os.path.join(self.path, 'test_trailing_slash.py'), 'w') as f:
00422             f.write("testdata = 'test_trailing_slash'")
00423         # Create the UNC path, like \\myhost\c$\foo\bar.
00424         path = os.path.abspath(self.path)
00425         import socket
00426         hn = socket.gethostname()
00427         drive = path[0]
00428         unc = "\\\\%s\\%s$"%(hn, drive)
00429         unc += path[2:]
00430         sys.path.append(path)
00431         mod = __import__("test_trailing_slash")
00432         self.assertEqual(mod.testdata, 'test_trailing_slash')
00433         unload("test_trailing_slash")

Here is the call graph for this function:

Definition at line 401 of file test_import.py.

00401 
00402     def setUp(self):
00403         os.mkdir(self.path)
00404         self.syspath = sys.path[:]

Here is the caller graph for this function:

Definition at line 405 of file test_import.py.

00405 
00406     def tearDown(self):
00407         rmtree(self.path)
00408         sys.path[:] = self.syspath

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 410 of file test_import.py.

00410 
00411     def test_trailing_slash(self):
00412         with open(os.path.join(self.path, 'test_trailing_slash.py'), 'w') as f:
00413             f.write("testdata = 'test_trailing_slash'")
00414         sys.path.append(self.path+'/')
00415         mod = __import__("test_trailing_slash")
00416         self.assertEqual(mod.testdata, 'test_trailing_slash')
00417         unload("test_trailing_slash")

Here is the call graph for this function:


Member Data Documentation

Definition at line 399 of file test_import.py.

Initial value:
('test', 'test\u00e4\u00f6\u00fc\u00df', 'test\u00e9\u00e8',
               'test\u00b0\u00b3\u00b2')

Definition at line 397 of file test_import.py.

Definition at line 403 of file test_import.py.

Definition at line 435 of file test_import.py.


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