def test_fold_scope_helper_properties(self): fsh = cfd.FoldScopeHelper(self.fold_scope, self.oed) assert fsh.range == (1, 4) assert fsh.start_line == 1 assert fsh.end_line == 4 assert fsh.name == "my_add" assert fsh.line == 1 assert fsh.def_type == OED.FUNCTION_TOKEN
def test_fold_scope_helper_repr(self): fsh = cfd.FoldScopeHelper(self.fold_scope, self.oed) assert "(at 0x" in repr(fsh)
def test_fold_scope_helper_str(self): fsh = cfd.FoldScopeHelper(self.fold_scope, self.oed) assert "my_add" in str(fsh)
def test_fold_scope_helper_str_with_parents(self): fsh = cfd.FoldScopeHelper(self.fold_scope, self.oed) fsh.parents = ["fake parent list!"] assert "parents:" in str(fsh)
def test_fold_scope_helper(self): fsh = cfd.FoldScopeHelper(None, None) assert isinstance(fsh, cfd.FoldScopeHelper)