a 5êdgº ã@sNddlZddlmZddlmZddlZGdd„dejƒZedkrJe  ¡dS)éN)Úsupport)Ú script_helperc@sDeZdZdd„Zdd„Zdd„Zdd„Ze e j d ¡d d „ƒZ d S) Ú EOFTestCasec CsPd}z tdƒWn4tyD}z| t|ƒ|¡WYd}~nd}~00tj‚dS)Nz4EOL while scanning string literal (, line 1)z'this is a test ©ÚevalÚ SyntaxErrorÚ assertEqualÚstrrÚ TestFailed©ÚselfÚexpectÚmsg©rú)/usr/local/lib/python3.9/test/test_eof.pyÚ test_EOFC s  &zEOFTestCase.test_EOFCc CsPd}z tdƒWn4tyD}z| t|ƒ|¡WYd}~nd}~00tj‚dS)NzBEOF while scanning triple-quoted string literal (, line 1)z'''this is a testrr rrrÚ test_EOFSs  &zEOFTestCase.test_EOFSc CsXd}ztdddddWn4tyL}z| t|ƒ|¡WYd}~nd}~00tj‚dS)Nú/unexpected EOF while parsing (, line 1)z"\xhh" \zÚexecT)Ú dont_inherit)Úcompilerrr rr r rrrÚtest_eof_with_line_continuations &z+EOFTestCase.test_eof_with_line_continuationcCsd}| t¡}tdƒWdƒn1s,0Y| t|jƒ|¡| t¡}tdƒWdƒn1sp0Y| t|jƒ|¡dS)Nrzx = 5\ú\)Z assertRaisesrrrr Ú exception)r r ÚexcinforrrÚtest_line_continuation_EOF&s & &z&EOFTestCase.test_line_continuation_EOFzsys.executable requiredcCs°t ¡”}t |dd¡}t |¡\}}}| d|¡| d|¡| d|¡t |dd¡}t |¡\}}}| d|¡| d|¡| d|¡Wdƒn1s¢0YdS)NZfoorsunexpected EOF while parsingsline 2ó\zy = 6\sy = 6\)rÚtemp_dirrZ make_scriptZassert_python_failureZassertIn)r rÚ file_nameÚrcÚoutÚerrrrrÚ,test_line_continuation_EOF_from_file_bpo21800s      z8EOFTestCase.test_line_continuation_EOF_from_file_bpo2180N) Ú__name__Ú __module__Ú __qualname__rrrrÚunittestZskipIfÚsysÚ executabler"rrrrrs     rÚ__main__) r'ÚtestrZ test.supportrr&ZTestCaserr#ÚmainrrrrÚs   8