Issue with Hw4 Rec Tests

Ganni02 (4920 points)
1 2 15
asked Dec 19, 2021 in HW4 by Ganni02 (4,920 points)

While working through the recovery for hw4, I stumbled upon what I presume to be an issue with the final 3 tests which test the method print_exam_record. Below is the description as written in the text.

- print_exam_record(exam_code, fileout, dbsize), which receives an
      exam_code of an exam and saves in fileout the information about that
      exam, using the following formula
"The student <stud_surname> <stud_name>, student number <stud_code>, took on <date> the <course_name> exam with the teacher <teach_surname> <teach_name> with grade <grade>."
      The function returns the exam grade associated with the exam_code
      received as input.

The expected results from the downloaded text files:

The student Maximilian Piatti, student number 1273288, took on 2020/06/12 the Metodi Di Progetto Per L'Ingegneria Industriale Lm exam with the teacher Matilde Menconi with grade 18.

The json files from which values are extracted:

{
  "teach_code": "000",
  "teach_name": "Matilde",
  "teach_surname": "Menconi",
  "teach_email": "menconi@small.it"
 },

The surname and name are changed in the expected result. The same happens in the 3 other tests. Should we amend the expected result or should the tests be amended?

Thank you :))

2 Answers

gabriel.bustamante (2540 points)
3 5 20
answered Dec 19, 2021 by gabriel.bustamante (2,540 points)
I was confused by this too. On the VM I pass all tests with the name-surname format for both the teacher and the student, I can only assume that they got switched up at some point.

I'll piggy-back off this to also report that on my machine I fail test 'pre1_m' due to a missing whitespace on line 14, but the same test passes on the VM, so don't fixate too much on it.
andrea.sterbini (172680 points)
511 927 1776
answered Dec 19, 2021 by andrea.sterbini (172,680 points)
Thanks for noticing this.

We will check
Ganni02 (4920 points)
1 2 15
commented Dec 23, 2021 by Ganni02 (4,920 points)
Professor, has a conclusion been reached about this? Should I submit them in reverse order or as explained in the original text?
andrea.sterbini (172680 points)
511 927 1776
commented Dec 26, 2021 by andrea.sterbini (172,680 points)
By default, tests are the reference and this should be considered a text mistake.
Ganni02 (4920 points)
1 2 15
commented Dec 26, 2021 by Ganni02 (4,920 points)
Thank you Professor.