RunestoneInteractive / fopp

Foundations of Python Programming
https://runestone.academy/runestone/static/fopp/index.html
37 stars 120 forks source link

access_ac_2_1_1_12 unit test should look for hardcoding #254

Closed sahi1l closed 4 years ago

sahi1l commented 5 years ago

Describe the bug The unit test for question access_ac_2_1_1_12 needs to look for hardcoding.

To Reproduce Steps to reproduce the behavior:

  1. Go to question access_ac_2_1_1_12.
  2. Add a second line num_lst=30
  3. Press run
  4. See how it gets full credit.

The unit test would either search for the number 30 and/or search for the len function.

bnmnetp commented 5 years ago

These are easy enough to add, and there are plenty of other questions on that page that should get a similar treatment. I fixed this one by adding the line

self.assertFalse(re.search(r'num_lst\s*=\s*30', self.getEditorText()), "hardcode check”)
EzraSkwarka commented 4 years ago

I'm one of the Berea students, I've started work on this issue

EzraSkwarka commented 4 years ago

Pull request made

dbrucknr commented 4 years ago

Hey everyone,

I was just checking to see if there had been any updates or resolutions to this issue?