<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> import unittest <EOL> from unidiff . patch import PatchedFile , Hunk <EOL> class TestPatchedFile ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> super ( TestPatchedFile , self ) . setUp ( ) <EOL> self . patched_file = PatchedFile ( ) <EOL> def test_is_added_file ( self ) : <EOL> hunk = Hunk ( src_start = <NUM_LIT:0> , src_len = <NUM_LIT:0> , tgt_start = <NUM_LIT:1> , tgt_len = <NUM_LIT:10> ) <EOL> self . patched_file . append ( hunk ) <EOL> self . assertTrue ( self . patched_file . is_added_file ) <EOL> def test_is_removed_file ( self ) : <EOL> hunk = Hunk ( src_start = <NUM_LIT:1> , src_len = <NUM_LIT:10> , tgt_start = <NUM_LIT:0> , tgt_len = <NUM_LIT:0> ) <EOL> self . patched_file . append ( hunk ) <EOL> self . assertTrue ( self . patched_file . is_removed_file ) <EOL> def test_is_modified_file ( self ) : <EOL> hunk = Hunk ( src_start = <NUM_LIT:1> , src_len = <NUM_LIT:10> , tgt_start = <NUM_LIT:1> , tgt_len = <NUM_LIT:8> ) <EOL> self . patched_file . append ( hunk ) <EOL> self . assertTrue ( self . patched_file . is_modified_file ) </s>
