mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	gh-104242: Enable test_is_char_device_true in pathlib test on all platform (GH-116983)
This commit is contained in:
		
							parent
							
								
									79be75735c
								
							
						
					
					
						commit
						af1b0e9440
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -1103,15 +1103,15 @@ def test_is_socket_true(self): | ||||||
|         self.assertIs(self.cls(self.base, 'mysock\x00').is_socket(), False) |         self.assertIs(self.cls(self.base, 'mysock\x00').is_socket(), False) | ||||||
| 
 | 
 | ||||||
|     def test_is_char_device_true(self): |     def test_is_char_device_true(self): | ||||||
|         # Under Unix, /dev/null should generally be a char device. |         # os.devnull should generally be a char device. | ||||||
|         P = self.cls('/dev/null') |         P = self.cls(os.devnull) | ||||||
|         if not P.exists(): |         if not P.exists(): | ||||||
|             self.skipTest("/dev/null required") |             self.skipTest("null device required") | ||||||
|         self.assertTrue(P.is_char_device()) |         self.assertTrue(P.is_char_device()) | ||||||
|         self.assertFalse(P.is_block_device()) |         self.assertFalse(P.is_block_device()) | ||||||
|         self.assertFalse(P.is_file()) |         self.assertFalse(P.is_file()) | ||||||
|         self.assertIs(self.cls('/dev/null\udfff').is_char_device(), False) |         self.assertIs(self.cls(f'{os.devnull}\udfff').is_char_device(), False) | ||||||
|         self.assertIs(self.cls('/dev/null\x00').is_char_device(), False) |         self.assertIs(self.cls(f'{os.devnull}\x00').is_char_device(), False) | ||||||
| 
 | 
 | ||||||
|     def test_is_mount_root(self): |     def test_is_mount_root(self): | ||||||
|         if os.name == 'nt': |         if os.name == 'nt': | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AN Long
						AN Long