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

Improve code example in marbles.core.TestCase docstring #142

Closed
wants to merge 0 commits into from

Conversation

joshhn
Copy link
Contributor

@joshhn joshhn commented Dec 20, 2023

Purpose

Fix Issue #117

Approach

It makes the example more clear. Fix the typo and add DS_Store to .gitignore.

Tests for New Behavior

No tests are needed for changes.

Checklist

Make sure you did the following (if applicable):

  • Signed and returned a copy of the CLA
  • Added tests for any new features or behaviors
  • Ran tox -e flake8 to make sure code style is consistent
  • Built and reviewed the docs
  • Added a note to the changelog

Open Questions and Pre-Merge TODOs

  • Use GitHub checklists. When solved, check the box and explain the answer.

Learning

N/A

@leifwalsh
Copy link
Contributor

leifwalsh commented Dec 20, 2023

The typo fix is right, thanks. But I think the intent of #117 was actually to think of a better test case to provide as an example. I'm not actually sure how the line range ended up that way, it's also missing the closing parenthesis. I think the current line range makes slightly more sense for getting_started.py rather than getting_started.py.annotated?

Do you want to brainstorm other ideas of example tests we could use to replace this?

@joshhn
Copy link
Contributor Author

joshhn commented Dec 22, 2023

Hi @leifwalsh

I think the current line range makes slightly more sense for getting_started.py rather than getting_started.py.annotated?

I think it is getting_started.py.annotated rather than getting_started.py because the example is trying to show the usage of note, which is available in getting_started.py.annotated, even though it's not optional here.

Do you want to brainstorm other ideas of example tests we could use to replace this?

I think the example is quite clear for me as a consumer to understand how to use marbles and the features it supports. However, based on the additional context in #142, I think of several simple examples that may be appropriate:

  • Basic arithmetic operations (e.g. division)
  • Testing a function with edge cases (e.g. Checking for the palindrome, checking a number is even...)

So what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants