<s> import sys <EOL> import os <EOL> import mock <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . dirname ( __file__ ) ) <EOL> from sublime_hg import find_hg_root <EOL> def test_ThatHgRootIsFoundCorrectly ( ) : <EOL> paths = ( <EOL> r'<STR_LIT>' , <EOL> r'<STR_LIT>' , <EOL> r'<STR_LIT>' , <EOL> ) <EOL> old_exists = os . path . exists <EOL> os . path . exists = lambda path : path . endswith ( '<STR_LIT>' ) <EOL> results = [ find_hg_root ( x ) for x in paths ] <EOL> os . path . exists = old_exists <EOL> assert results == [ None , None , '<STR_LIT>' ] </s>
