mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Cleanup test_tracemalloc.py. Patch written by Vajrasky Kok.
This commit is contained in:
		
							parent
							
								
									d476ab1276
								
							
						
					
					
						commit
						a89ecc7d23
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		|  | @ -1,6 +1,4 @@ | |||
| import _tracemalloc | ||||
| import contextlib | ||||
| import datetime | ||||
| import os | ||||
| import sys | ||||
| import tracemalloc | ||||
|  | @ -207,7 +205,7 @@ def test_get_traced_memory(self): | |||
|         size, max_size = tracemalloc.get_traced_memory() | ||||
|         self.assertGreater(size, 0) | ||||
| 
 | ||||
|         # stop() rests also traced memory counters | ||||
|         # stop() also resets traced memory counters | ||||
|         tracemalloc.stop() | ||||
|         self.assertEqual(tracemalloc.get_traced_memory(), (0, 0)) | ||||
| 
 | ||||
|  | @ -729,7 +727,7 @@ def test_env_var(self): | |||
|         stdout = stdout.rstrip() | ||||
|         self.assertEqual(stdout, b'False') | ||||
| 
 | ||||
|         # PYTHON* environment varibles must be ignored when -E option is | ||||
|         # PYTHON* environment variables must be ignored when -E option is | ||||
|         # present | ||||
|         code = 'import tracemalloc; print(tracemalloc.is_tracing())' | ||||
|         ok, stdout, stderr = assert_python_ok('-E', '-c', code, PYTHONTRACEMALLOC='1') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner