mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Clean up NEWS entry and tests for shutil.disk_usage (#12442)
This commit is contained in:
		
							parent
							
								
									9d872e19aa
								
							
						
					
					
						commit
						2ee61884fe
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -206,7 +206,7 @@ handle NAT with non-secure FTP without opening fixed ports.
 | 
			
		|||
shutil
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
The :mod:`shutil` module has a new :func:`~shutil.disk_usage` providing total,
 | 
			
		||||
The :mod:`shutil` module has a new :func:`~shutil.disk_usage` function providing total,
 | 
			
		||||
used and free disk space statistics.
 | 
			
		||||
 | 
			
		||||
(Contributed by Giampaolo Rodolà in :issue:`12442`)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -732,11 +732,11 @@ def _boo(filename, extract_dir, extra):
 | 
			
		|||
                         "disk_usage not available on this platform")
 | 
			
		||||
    def test_disk_usage(self):
 | 
			
		||||
        usage = shutil.disk_usage(os.getcwd())
 | 
			
		||||
        self.assertTrue(usage.total > 0)
 | 
			
		||||
        self.assertTrue(usage.used > 0)
 | 
			
		||||
        self.assertTrue(usage.free >= 0)
 | 
			
		||||
        self.assertTrue(usage.total >= usage.used)
 | 
			
		||||
        self.assertTrue(usage.total > usage.free)
 | 
			
		||||
        self.assertGreater(usage.total, 0)
 | 
			
		||||
        self.assertGreater(usage.used, 0)
 | 
			
		||||
        self.assertGreaterEqual(usage.free, 0)
 | 
			
		||||
        self.assertGreaterEqual(usage.total, usage.used)
 | 
			
		||||
        self.assertGreater(usage.total, usage.free)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class TestMove(unittest.TestCase):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue