def test_multi_step_match(self): self.assertEquals(["path", "is", "this"], auto_complete._get_completion_path('........path.is.this')) self.assertEquals(["path", "is", "this2"], auto_complete._get_completion_path('path.is.this2')) self.assertEquals(["path", "is", "this3"], auto_complete._get_completion_path(' path.is.this3')) self.assertEquals(["path", "is", "this4"], auto_complete._get_completion_path(',,,path.is.this4'))
def test_single_ns_step_match(self): self.assertEquals(["this"], auto_complete._get_completion_path(' /* Comment this')) self.assertEquals(["this2"], auto_complete._get_completion_path('// this2')) self.assertEquals(["this3"], auto_complete._get_completion_path('...........this3')) self.assertEquals(["this4"], auto_complete._get_completion_path(' this4'))
def test_get_completion_path_with_a_signle_slash_comment(self): self.assertEquals(["path", "is", "this"], auto_complete._get_completion_path(' // Comment path.is.this')) self.assertEquals(["path", "is", "this2"], auto_complete._get_completion_path('// path.is.this2')) self.assertEquals(["path", "is", "this3"], auto_complete._get_completion_path('//path.is.this3')) self.assertEquals(["path", "is", "this4"], auto_complete._get_completion_path('Some non Comment // path.is.this4'))
def test_get_completion_path_with_a_star_comment(self): self.assertEquals(["path", "is", "this"], auto_complete._get_completion_path(' /* Comment path.is.this')) self.assertEquals(["path", "is", "this2"], auto_complete._get_completion_path('/** path.is.this2')) self.assertEquals(["path", "is", "this3"], auto_complete._get_completion_path('*path.is.this3')) self.assertEquals(["path", "is", "this4"], auto_complete._get_completion_path('** path.is.this4'))
def test_get_completion_path_with_non_valid_line(self): self.assertIsNone(auto_complete._get_completion_path('....')) self.assertIsNone(auto_complete._get_completion_path(',.,.,.,'))