Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion participants/scipy_002/pr_tutorial/buggy_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def angle_to_sexigesimal(angle_in_degrees, decimals=3):
if math.floor(decimals) != decimals:
raise OSError('decimals should be an integer!')

hours_num = angle_in_degrees*24/180
hours_num = angle_in_degrees*24/360

Choose a reason for hiding this comment

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

Would spaces between operators help with readability here? What are the style rules for this repo?

Copy link
Author

Choose a reason for hiding this comment

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

Attended BYU myself

hours = math.floor(hours_num)

min_num = (hours_num - hours)*60
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pr_tutorial.buggy_function import angle_to_sexigesimal


def test_angle_to_sexigesimal_360():
"""Simplest test for one crete case"""
assert angle_to_sexigesimal(360.0) == '24:0:0.000'