Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/content/docs/curriculum-help.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,17 @@ node.block_has_call("get") # True
node.block_has_call("split") # False
```

### Asserting absence of a function call

Sometimes a challenge requires learners to remove a specific statement, such as a `print()` call.

To assert that a function call does not exist in the learner’s code, simply negate the helper result:

```python
assert not Node(code).has_call("print()")
assert not Node(code).block_has_call("print")
```

#### `has_import()`

```python
Expand Down