Skip to content

Instantly share code, notes, and snippets.

@zalun
Created February 13, 2023 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zalun/5153670da3141710db0964087660b80d to your computer and use it in GitHub Desktop.
Save zalun/5153670da3141710db0964087660b80d to your computer and use it in GitHub Desktop.
Coder's Adventures: Triggering an old bug with a new code
# test_b_get_field.py
from .get_field import get_field
from .resource import IMPORTANT_DICT
def test_get_field_minimal():
assert get_field() is None
def test_get_field_another_key():
assert get_field(key="another key") is None
def test_get_field_existing_dict():
assert get_field(dictionary=IMPORTANT_DICT) == {"key": "value"}
def test_get_field_existing_dict_another_key():
assert get_field(dictionary=IMPORTANT_DICT, key="another key") is None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment