Beispiel #1
0
 def test_common_prefix_func(self):
     assert jl.commonprefix("","") == ""
     assert jl.commonprefix("/hello/world","/path/to") == "/"
     assert jl.commonprefix("pyramid","python") == "py"
     assert jl.commonprefix("0"*100,"0"*100) == "0"*100
     with pytest.raises(AssertionError):
         jl.commonprefix(None,None)
Beispiel #2
0
 def test_common_prefix_func(self):
     assert jl.commonprefix("","") == ""
     assert jl.commonprefix("/hello/world","/path/to") == "/"
     assert jl.commonprefix("pyramid","python") == "py"
     assert jl.commonprefix("0"*100,"0"*100) == "0"*100
     with py.test.raises(AssertionError):
         jl.commonprefix(None,None)