Back to index

python3.2  3.2.2
Public Member Functions
test.test_warnings.BootstrapTest Class Reference

List of all members.

Public Member Functions

def test_issue_8766

Detailed Description

Definition at line 770 of file test_warnings.py.


Member Function Documentation

Definition at line 771 of file test_warnings.py.

00771 
00772     def test_issue_8766(self):
00773         # "import encodings" emits a warning whereas the warnings is not loaded
00774         # or not completely loaded (warnings imports indirectly encodings by
00775         # importing linecache) yet
00776         with support.temp_cwd() as cwd, support.temp_cwd('encodings'):
00777             env = os.environ.copy()
00778             env['PYTHONPATH'] = cwd
00779 
00780             # encodings loaded by initfsencoding()
00781             retcode = subprocess.call([sys.executable, '-c', 'pass'], env=env)
00782             self.assertEqual(retcode, 0)
00783 
00784             # Use -W to load warnings module at startup
00785             retcode = subprocess.call(
00786                 [sys.executable, '-c', 'pass', '-W', 'always'],
00787                 env=env)
00788             self.assertEqual(retcode, 0)

Here is the call graph for this function:


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