Skip to content

Commit 66b7ef8

Browse files
Merge pull request #187 from lambda-feedback/tr161-wrong-conversion-factor-for-radians
Added `rad` as a short form for radian and removed `rad` as an altern…
2 parents 0a4279e + 9d1a768 commit 66b7ef8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: app/symbolic_comparison_evaluation_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ def test_no_reserved_keywords_in_old_format_input_symbol_alternatives(self):
11701170
'symbol_assumptions': "('n','integer')",
11711171
}
11721172
),
1173+
("-2525", "-2525", "response = a*50 + d*51*25 where a=77; d=-5", True, [], {}),
11731174
]
11741175
)
11751176
def test_criteria_based_comparison(self, response, answer, criteria, value, feedback_tags, additional_params):

Diff for: app/unit_system_conversions.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
This is the subset of common symbols whose short form symbols are allowed
8080
"""
8181
set_of_very_common_units_in_SI = {
82-
('radian', 'r', '(1/(2*pi))', tuple(), ('radians',)), # Note: here 'r' is used instead of the more common 'rad' to avoid collision
83-
('steradian', 'sr', '(1)', tuple(), ('steradians',)),
82+
('radian', 'rad', '(1/(2*pi))', tuple(), ('radians',)), # Note: here 'r' is used instead of the more common 'rad' to avoid collision
83+
('steradian', 'sr', '(1)', tuple(), ('steradians',)),
8484
('minute', 'min', '(60*second)', tuple(), ('minutes',)),
8585
('hour', 'h', '(3600*second)', tuple(), ('hours',)),
8686
('degree', 'deg', '(pi/180)', tuple(), ('degrees',)),
@@ -111,7 +111,8 @@
111111
('barn', 'b', '(10**(-28)*metre**2)', tuple(), ('barns',)),
112112
('curie', 'Ci', '(3.7*10**10*becquerel)', ('Curie',), ('curies',)),
113113
('roentgen', 'R', '(2.58*10**(-4)*kelvin/(kilogram))', ('Roentgen', 'Röntgen'), ('roentgens', 'Roentgens')),
114-
('rad', 'rad', '(10**(-2)*gray)', tuple(), ('rads',)),
114+
# Removed rad since it collides with the short form for radian.
115+
#('rad', 'rad', '(10**(-2)*gray)', tuple(), ('rads',)),
115116
('rem', 'rem', '(10**(-2)*sievert)', tuple(), ('rems',)),
116117
}
117118

0 commit comments

Comments
 (0)