{"action":"closed","issue":{"url":"https://api.github.com/repos/datacamp/pythonwhat/issues/92","repository_url":"https://api.github.com/repos/datacamp/pythonwhat","labels_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/92/comments","events_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/92/events","html_url":"https://github.com/datacamp/pythonwhat/issues/92","id":178140750,"number":92,"title":"`test_for_loop()` within this `test_function_definition()`: BLOCK BETA 09/23","user":{"login":"hugobowne","id":4182382,"avatar_url":"https://avatars.githubusercontent.com/u/4182382?v=3","gravatar_id":"","url":"https://api.github.com/users/hugobowne","html_url":"https://github.com/hugobowne","followers_url":"https://api.github.com/users/hugobowne/followers","following_url":"https://api.github.com/users/hugobowne/following{/other_user}","gists_url":"https://api.github.com/users/hugobowne/gists{/gist_id}","starred_url":"https://api.github.com/users/hugobowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugobowne/subscriptions","organizations_url":"https://api.github.com/users/hugobowne/orgs","repos_url":"https://api.github.com/users/hugobowne/repos","events_url":"https://api.github.com/users/hugobowne/events{/privacy}","received_events_url":"https://api.github.com/users/hugobowne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/datacamp/pythonwhat/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-20T18:38:47Z","updated_at":"2016-09-23T16:55:39Z","closed_at":"2016-09-23T16:55:39Z","body":"I am trying to write an SCT for the solution code below (see my SCT attempt below it).\r\n\r\nI cannot figure out how to `test_for_loop()` within this `test_function_definition()`.  Probably related to my not understanding `test_expression_result()` see #91.  But also because I am having problems with `extra_env` and `context_vals` with `**kwargs` here (I think!).\r\n\r\n```{python}\r\n# Define report_status\r\ndef report_status(**kwargs):\r\n    \"\"\"Print out the status of a movie character.\"\"\"\r\n\r\n    print(\"\\nBEGIN: REPORT\\n\")\r\n\r\n    # Print a formatted status report\r\n    for key, value in kwargs.items():\r\n        print(key + \": \" + value)\r\n\r\n    print(\"\\nEND REPORT\")\r\n\r\n# First call to report_status()\r\nreport_status(name=\"luke\", affiliation=\"jedi\", status=\"missing\")\r\n\r\n# Second call to report_status()\r\nreport_status(name=\"anakin\", affiliation=\"sith lord\", status=\"deceased\")\r\n\r\n```\r\n\r\n*** =sct\r\n```{python}\r\n# All functions used here are defined in the pythonwhat Python package.\r\n# Documentation can also be found at github.com/datacamp/pythonwhat/wiki\r\n\r\ndef inner_test():\r\n    #context=[{'name':\"luke\", 'affiliation':\"jedi\", 'status':\"missing\"}]\r\n    test_function(\"print\", index=1)\r\n\r\n# Test: report_status() definition\r\ntest_function_definition(\r\n    \"report_status\", body=inner_test,\r\n    outputs = [{'args': [], 'kwargs': {'name':\"hugo\", 'affiliation':\"datacamp\"}}]\r\n)\r\n\r\n```"}}
{"actor":{"display_login":"filipsch"}}