#NEWLINE# @ pytest . mark . parametrize ( 'path,parent,expected' , [ ( '/var/test2' , '/var/test' , False ) , ( '/var/test' , '/var/test2' , False ) , ( 'var/test2' , 'var/test' , False ) , ( 'var/test' , 'var/test2' , False ) , ( '/var/test/sub' , '/var/test' , True ) , ( '/var/test' , '/var/test/sub' , False ) , ( 'var/test/sub' , 'var/test' , True ) , ( 'var/test' , 'var/test' , True ) , ( 'var/test' , 'var/test/fake_sub/..' , True ) , ( 'var/test/sub/sub2/sub3/../..' , 'var/test' , True ) , ( 'var/test/sub' , 'var/test/fake_sub/..' , True ) , ( 'var/test' , 'var/test/sub' , False ) ] ) #NEWLINE# def test_is_subdirectory( path , parent , expected ) : #NEWLINE# #INDENT# assert ( is_subdir ( path , parent ) == expected )