Files
Pyarmor-Static-Unpack-1shot/tests/tokenized/test_with.txt
Michael Hansen 391ba6502d Migrate additional tests which previously didn't have reference source to
the new test system, including new reference source.
2019-10-07 17:06:08 -07:00

52 lines
829 B
Plaintext

with open ( __file__ ) : <EOL>
<INDENT>
result = True <EOL>
<OUTDENT>
with open ( __file__ ) as f : <EOL>
<INDENT>
f . read ( ) <EOL>
<OUTDENT>
with open ( __file__ ) as f : <EOL>
<INDENT>
s = f . readline ( ) <EOL>
while s : <EOL>
<INDENT>
s = f . readline ( ) <EOL>
<OUTDENT>
<OUTDENT>
with open ( __file__ ) as f : <EOL>
<INDENT>
result = False <EOL>
data = f . read ( ) <EOL>
if data : <EOL>
<INDENT>
result = True <EOL>
<OUTDENT>
else : <EOL>
<INDENT>
data = 'empty' <EOL>
<OUTDENT>
<OUTDENT>
with open ( __file__ ) as f : <EOL>
<INDENT>
result = None <EOL>
try : <EOL>
<INDENT>
data = f . read ( ) <EOL>
if data : <EOL>
<INDENT>
result = data <EOL>
<OUTDENT>
else : <EOL>
<INDENT>
result = '' <EOL>
<OUTDENT>
<OUTDENT>
except : <EOL>
<INDENT>
result = 'exception' <EOL>
<OUTDENT>
else : <EOL>
<INDENT>
result += '\n' <EOL>