mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 15:41:43 +00:00 
			
		
		
		
	Issue #8013: Fixed test
This commit is contained in:
		
							parent
							
								
									e1bc898216
								
							
						
					
					
						commit
						3e913c9ecf
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
					@ -123,8 +123,15 @@ def test_asctime(self):
 | 
				
			||||||
        time.asctime(time.gmtime(self.t))
 | 
					        time.asctime(time.gmtime(self.t))
 | 
				
			||||||
        self.assertRaises(TypeError, time.asctime, 0)
 | 
					        self.assertRaises(TypeError, time.asctime, 0)
 | 
				
			||||||
        self.assertRaises(TypeError, time.asctime, ())
 | 
					        self.assertRaises(TypeError, time.asctime, ())
 | 
				
			||||||
        self.assertRaises(ValueError, time.asctime,
 | 
					        # XXX: Posix compiant asctime should refuse to convert
 | 
				
			||||||
                          (12345, 1, 0, 0, 0, 0, 0, 0, 0))
 | 
					        # year > 9999, but Linux implementation does not.
 | 
				
			||||||
 | 
					        # self.assertRaises(ValueError, time.asctime,
 | 
				
			||||||
 | 
					        #                  (12345, 1, 0, 0, 0, 0, 0, 0, 0))
 | 
				
			||||||
 | 
					        # XXX: For now, just make sure we don't have a crash:
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            time.asctime((12345, 1, 0, 0, 0, 0, 0, 0, 0))
 | 
				
			||||||
 | 
					        except ValueError:
 | 
				
			||||||
 | 
					            pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_asctime_bounding_check(self):
 | 
					    def test_asctime_bounding_check(self):
 | 
				
			||||||
        self._bounds_checking(time.asctime)
 | 
					        self._bounds_checking(time.asctime)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue