Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing test features to README #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.rst
Expand Up @@ -66,6 +66,23 @@ Example
{'code': '6*7', 'result': '42'}
]

# Samples of code which needs completion
completion_samples = [
{'text': 'my_long', 'matches': ['my_long_variable_name', 'my_long_function_name']},
{'text': 'a.', 'matches': ['a.foo', 'a.bar']}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth copying the example from test_ipykernel.py here? I'm looking at these examples and wondering where the setup code is to create the variables you're completing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, those examples are not relevant. We could use setup code to create some variables, or use built-in functions? I'll take a look at test_ipykernel.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I didn't see you had examples on the repo. Maybe we could make it clearer that it's examples? And add a link to those examples in the README?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, by all means. Maybe keep a shortened example in the README itself so it's readable at a glance.

]

# Samples of code which are complete, incomplete, or invalid
complete_code_samples = ['a = 3']
incomplete_code_samples = ['def foo:']
invalid_code_samples = ['this is invalid python code, right?']

# Sample of code which can be inspected
code_inspect_sample = 'print?'

# Sample of code which should clear the output
code_clear_output = 'clear'

# Samples of code which should generate a rich display output, and
# the expected MIME type
code_display_data = [
Expand Down