Skip to content
Snippets Groups Projects
Unverified Commit 8885b32b authored by Dong Zhuang's avatar Dong Zhuang Committed by GitHub
Browse files

Merge pull request #448 from adamjstewart/fixes/feedback-points-1ish

Fix bug when feedback points are close enough to 1
parents ef0f7657 b00695fa
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
import math
import sys
import traceback
......@@ -300,6 +301,9 @@ def run_code(result, run_req):
package_exception(result, "test_error")
return
if feedback.points is not None and math.isclose(feedback.points, 1):
feedback.points = 1
if not (feedback.points is None or 0 <= feedback.points <= 1):
raise ValueError("grade point value is invalid: %s"
% feedback.points)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment