GatorIncubator / gatorgrouper

:busts_in_silhouette: Automated Group Formation Tool Enabling Effective Team Work
GNU General Public License v3.0
20 stars 20 forks source link

The `parse_argument` Should not Handle Group Number 0 and 1 #194

Closed Lancasterwu closed 5 years ago

Lancasterwu commented 5 years ago

Based on Issue https://github.com/GatorEducator/gatorgrouper/issues/184, I found that:

The function parse_argument.py has a bug in check_valid_num_group which allows the program to handle input --num-group 0 and --num-group 1, It should not be able to.

    if numgrp > students_list_length:
        logging.error("Number of groups: %d", numgrp)
        logging.error("Number of students: %d", students_list_length)

This is a bug because spliting the class to 0 group or 1 group does not make any sense. Because of this, test_check_number_groups_size_zero and test_check_number_groups_size_one in test_num_group.py are currently passing, which they shouldn't.

@reibelj will make a PR to fix this bug and the related test functions.

reibelj commented 5 years ago

This bug should be solved. I modified the if condition in order to account for the group sizes of 0 and 1. I also modified the respective tests to make sure they properly handle these sizes. This will be merged with the refactoring and debgging of parse_arguments.py Issue #184

reibelj commented 5 years ago

@baldeosinghm will handle this. He and I discussed the implementation of the if statement and developed a new statement that will properly be handled by the tests. if numgrp <= 1 or numgrp > students_list_length:

baldeosinghm commented 5 years ago

This issue was handled by PR #226