[Python] Bug in restaurant-rozalynn test file

In the none_test.py file the “test_arrange_reservations_1” test is skipping “Walter”, who should get assigned to seat 1.

    def test_arrange_reservations_1(self):
        guests = ['Walter', 'Frank', 'Jenny', 'Carol', 'Alice', 'George']
        expected_results =  {1: 'Frank', 2: 'Jenny', 3: 'Carol', 4: 'Alice', 5: 'George',
                             6: None, 7: None, 8: None, 9: None, 10: None,
                             11: None, 12: None, 13: None, 14: None, 15: None,
                             16: None, 17: None, 18: None, 19: None, 20: None, 21: None, 22: None}
        failure_msg = 'The reservation dict is incorrect'

        self.assertDictEqual(arrange_reservations(guests), expected_results, msg=failure_msg)

The examplar implementation passes the test because it chooses to skip the first name, but this doesn’t match with the copy on the website description, which implies that all names should be assigned:

>>> arrange_reservations(guests=["Walter", "Frank", "Jenny", "Carol", "Alice", "George"])
...
{1: 'Walter', 2: 'Frank', 3: 'Jenny', 4: 'Carol', 5: 'Alice', 6: 'George', 7: None, 8: None, 9: None, 10: None, 11: None, 12: None, 13: None, 14: None, 15: None, 16: None, 17: None, 18: None, 19: None, 20: None, 21: None, 22: None}

That exercise is marked as a WIP. If you’re seeing that exercise on the website, you’ve found a bug! Did that exercise show up on the website for you somewhere?

Yep, via both the Overview and the Syllabus trees. It does show the “Work in Progress” label on the exercise description page – side note, kind of ambiguous if that’s the assignment being a WIP vs it being an assignment that is currently set to “In-Progress” status because I’m working on it – did notice that in the Overview and Syllabus trees it displyas a lightbulb icon, wasn’t sure what that meant.

Either way, still shouldn’t ignore poor Walter.

WIP indicates it’s not complete and not ready for release. As such, it’s not expected to actually work. But also, it’s not supposed to appear on the website. It is being worked on and is not complete. That means there’s things that need to change and likely plenty of known issues.

I believe the light bulb icon may indicate it is a concept exercise.

Given that it’s a WIP, this exercise is not meant to appear. I’m not sure why/how you’re able to see it. I know it doesn’t show up for me in the exercises or concept list and that I’m unable to work on it.

@ErikSchierboom Is there a bug here?

Though I haven’t been around much I think I’m still probably flagged as a track developer / maintainer … might explain why I’m seeing WIP exercises, if you’re not.

Hi yawpitch!

Happy to see you! :smile:

The reason you’re seeing WIP exercises as available is that you are flagged as a maintainer on the Python repo. Maintainers can now see WIP and partially completed exercises that have been merged into main. These exercises aren’t public, and in many cases aren’t complete/have errors. But they are at some stage where we want to check layout or error messages, or some other UI-dependent thing.

@IsaacG - this would be a bug if yawpitch was not designated as a Python maintainer, but he is. :smile:

@yawpitch – Agree that those tests shouldn’t ignore poor Walter!! We just haven’t gotten back around to re-working that exercise. Please feel free to log bugs around what you see/notice. In fact, feel free to PR solutions, if you are so motivated! :wink:

Just to help you with the UI a bit - if an exercise has a lightbulb, then it’s a learning or concept exercise. Everything else should be a practice exercise. Only the concept exercises would have a WIP status. All WIP status exercises are NOT ready for primetime. These include:

  • Pretty Leaflett (string formatting),
  • Plane Tickets (generators),
  • Restaurant Rozalynn (None),
  • Electric Bill (numbers replacement), and
  • Log Levels (Enums).

I have to update this once again, but you can see general status/plans for the track here, and overview information here.

Feel free to ping me on Slack if you have more questions, or want to get more involved. :smile: Hope everything is going well with you!

2 Likes

You are correct! You were typing this reply whilst I was typing mine. :smile:

Thanks Bethany for explaining!