mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			750 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			750 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import __future__
 | 
						|
import unittest
 | 
						|
 | 
						|
class FLUFLTests(unittest.TestCase):
 | 
						|
 | 
						|
    def test_barry_as_bdfl(self):
 | 
						|
        code = "from __future__ import barry_as_FLUFL; 2 {0} 3"
 | 
						|
        compile(code.format('<>'), '<BDFL test>', 'exec',
 | 
						|
                __future__.CO_FUTURE_BARRY_AS_BDFL)
 | 
						|
        self.assertRaises(SyntaxError, compile, code.format('!='),
 | 
						|
                            '<FLUFL test>', 'exec',
 | 
						|
                            __future__.CO_FUTURE_BARRY_AS_BDFL)
 | 
						|
 | 
						|
    def test_guido_as_bdfl(self):
 | 
						|
        code = '2 {0} 3'
 | 
						|
        compile(code.format('!='), '<BDFL test>', 'exec')
 | 
						|
        self.assertRaises(SyntaxError, compile, code.format('<>'),
 | 
						|
                            '<FLUFL test>', 'exec')
 | 
						|
 | 
						|
 | 
						|
if __name__ == '__main__':
 | 
						|
    unittest.main()
 |