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

test: implements freezegun to enable freezing of time for testing #12

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

apoclyps
Copy link
Owner

@apoclyps apoclyps commented Nov 15, 2023

Description

implements freezegun to enable freezing of time for testing

Changes

This PR implements the following changes:

  1. test: implements freezegun to enable freezing of time for testing

"""Test that get_uuid() returns a valid uuid."""
UUID(get_uuid())
assert UUID(get_uuid())
Copy link
Collaborator

Choose a reason for hiding this comment

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

nab: why use assert?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It asserts the value is truthy but in highlight that's not a great test either as it still raises a ValueError - instead we should catch the value error and cause pytest to raise an exception

Copy link
Owner Author

Choose a reason for hiding this comment

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

image

@apoclyps apoclyps merged commit 356f064 into main Nov 15, 2023
5 checks passed
@apoclyps apoclyps deleted the kyleharrison/tests/adds-freezegun branch November 15, 2023 13:48
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