mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Fixing bug with long ints #308

Closed jolyonb closed 3 years ago

jolyonb commented 3 years ago

Previously, long integers passed in sample_from or user_constants would cause an error. This fixes that error.

Code:

from mitxgraders import *

grader = MatrixGrader(
    answers='x',
    user_constants={'x': 10 ** 19}
)

grader(None, 'x')
codecov-io commented 3 years ago

Codecov Report

Merging #308 (fbaac50) into master (6cd9cef) will decrease coverage by 0.37%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #308      +/-   ##
===========================================
- Coverage   100.00%   99.62%   -0.38%     
===========================================
  Files           32       32              
  Lines         2900     2903       +3     
===========================================
- Hits          2900     2892       -8     
- Misses           0       11      +11     
jolyonb commented 3 years ago

@ChristopherChudzicki You might find this one amusing.