def test_path_level(self): test = lambda a: TestImpl.path_level(Link(a)) assert test('http://example.org/') == 0 assert test('http://example.org/foo') == 0 assert test('http://example.org/foo/') == 1