Skip to content
Snippets Groups Projects
Commit 2a60682b authored by tuhe's avatar tuhe
Browse files

Tested on win

parent 374906ef
No related branches found
No related tags found
No related merge requests found
{"run_id": 458734, "state": "fail", "coverage_files_changed": null, "stdout": [[0, "oh hello sexy. _testMethodName\noh hello sexy. test_bad\noh hello sexy. __class__\noh hello sexy. __unittest_expecting_failure__\nhi there __unittest_expecting_failure__\noh hello sexy. _callSetUp\noh hello sexy. _with_coverage\noh hello sexy. setUp\noh hello sexy. _callTestMethod\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _testMethodDoc\noh hello sexy. _cache_put\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. shortDescriptionStandard\noh hello sexy. _testMethodDoc\noh hello sexy. _testMethodName\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _cache2\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\n\u001b[31m\r 0%| | 0/100 [00:00<?, ?it/s]\u001b[37m"], [1, "\u001b[31m\r 10%|# | 10/100 [00:00<00:00, 98.47it/s]\u001b[37m"], [2, "\u001b[31m\r 20%|## | 20/100 [00:00<00:00, 96.03it/s]\u001b[37m\u001b[31m\r 30%|### | 30/100 [00:00<00:00, 96.12it/s]\u001b[37m"], [3, "\u001b[31m\r 40%|#### | 40/100 [00:00<00:00, 96.49it/s]\u001b[37m"], [4, "\u001b[31m\r 50%|##### | 50/100 [00:00<00:00, 97.36it/s]\u001b[37m\u001b[31m\r 60%|###### | 60/100 [00:00<00:00, 97.71it/s]\u001b[37m"], [5, "\u001b[31m\r 70%|####### | 70/100 [00:00<00:00, 96.98it/s]\u001b[37m"], [6, "\u001b[31m\r 80%|######## | 80/100 [00:00<00:00, 97.46it/s]\u001b[37m\u001b[31m\r 90%|######### | 90/100 [00:00<00:00, 97.87it/s]\u001b[37m"], [7, "\u001b[31m\r100%|##########| 100/100 [00:01<00:00, 98.15it/s]\u001b[37m\u001b[31m\u001b[37m\u001b[31m\r100%|##########| 100/100 [00:01<00:00, 97.46it/s]\u001b[37m\u001b[31m\n\u001b[37moh hello sexy. assertEqual\noh hello sexy. _getAssertEqualityFunc\noh hello sexy. _type_equality_funcs\noh hello sexy. _baseAssertEqual\noh hello sexy. assertEqualC\noh hello sexy. wrap_assert\noh hello sexy. assertEqual\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. _cache_contains\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _cache_get\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _assert_cache_index\nWarning, framework missing cache index (('Numpy', 'test_bad'), 'assert') id = 0 - The test will be skipped for now.\noh hello sexy. _setup_answers_mode\noh hello sexy. _cache_put\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _assert_cache_index\noh hello sexy. _setup_answers_mode\noh hello sexy. _getAssertEqualityFunc\noh hello sexy. _baseAssertEqual\noh hello sexy. _formatMessage\noh hello sexy. longMessage\noh hello sexy. failureException\noh hello sexy. _callTearDown\noh hello sexy. tearDown\noh hello sexy. _with_coverage\noh hello sexy. doCleanups\noh hello sexy. _outcome\noh hello sexy. _cleanups\noh hello sexy. _feedErrorsToResult\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. _cache_contains\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _testMethodDoc\noh hello sexy. _testMethodDoc\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\n\u001b[92m>\n\u001b[92m> Hints (from 'test_bad')\n\u001b[92m> * Remember to properly de-indent your code.\n> * Do more stuff which works.\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. failureException\noh hello sexy. failureException\noh hello sexy. __class__\noh hello sexy. _error_fed_during_run\n\u001b[31mTraceback (most recent call last):\n File \"/usr/lib/python3.10/unittest/case.py\", line 59, in testPartExecutor\n yield\n File \"/usr/lib/python3.10/unittest/case.py\", line 591, in run\n self._callTestMethod(testMethod)\n File \"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\", line 516, in _callTestMethod\n res = testMethod()\n File \"/home/tuhe/Documents/unitgrade_private/devel/example_devel/instructor/cs108/report_devel.py\", line 75, in test_bad\n self.assertEqualC(add(3, b))\n File \"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\", line 613, in assertEqualC\n self.wrap_assert(self.assertEqual, first, msg)\n File \"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\", line 601, in wrap_assert\n assert_fun(first, _expected, *args, **kwargs)\nAssertionError: 3 != 'Key 0 not found in cache; framework files missing. Please run deploy()'\n\u001b[37m"]], "wz_stacktrace": "<div class=\"traceback\">\n <h3>Traceback <em>(most recent call last)</em>:</h3>\n <ul><li><div class=\"frame\" id=\"frame-140591462072832\">\n <h4>File <cite class=\"filename\">\"/usr/lib/python3.10/unittest/case.py\"</cite>,\n line <em class=\"line\">59</em>,\n in <code class=\"function\">testPartExecutor</code></h4>\n <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"> </span>@contextlib.contextmanager</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>def testPartExecutor(self, test_case, isTest=False):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>old_success = self.success</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self.success = True</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>try:</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>yield</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except KeyboardInterrupt:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>raise</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except SkipTest as e:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.success = False</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.skipped.append((test_case, str(e)))</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-140591462169200\">\n <h4>File <cite class=\"filename\">\"/usr/lib/python3.10/unittest/case.py\"</cite>,\n line <em class=\"line\">591</em>,\n in <code class=\"function\">run</code></h4>\n <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._callSetUp()</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if outcome.success:</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>outcome.expecting_failure = expecting_failure</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self, isTest=True):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self._callTestMethod(testMethod)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>outcome.expecting_failure = False</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._callTearDown()</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.doCleanups()</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-140591462169312\">\n <h4>File <cite class=\"filename\">\"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\"</cite>,\n line <em class=\"line\">516</em>,\n in <code class=\"function\">_callTestMethod</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>self._ensure_cache_exists() # Make sure cache is there.</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if self._testMethodDoc is not None:</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache_put((self.cache_id(), &#39;title&#39;), self.shortDescriptionStandard())</pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache2[(self.cache_id(), &#39;assert&#39;)] = {}</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>res = testMethod()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>elapsed = time.time() - t</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._get_outcome()[ (self.cache_id(), &#34;return&#34;) ] = res</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._cache_put((self.cache_id(), &#34;time&#34;), elapsed)</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-140591462169424\">\n <h4>File <cite class=\"filename\">\"/home/tuhe/Documents/unitgrade_private/devel/example_devel/instructor/cs108/report_devel.py\"</cite>,\n line <em class=\"line\">75</em>,\n in <code class=\"function\">test_bad</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>for i in tqdm(range(100)):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span># print(&#34;The current number is&#34;, i)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>time.sleep(.01)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self.assertEqual(1, d[&#39;x1&#39;])</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>for b in range(10):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self.assertEqualC(add(3, b))</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>def test_weights(self):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>&#34;&#34;&#34;</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>Hints:</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-140591462169536\">\n <h4>File <cite class=\"filename\">\"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\"</cite>,\n line <em class=\"line\">613</em>,\n in <code class=\"function\">assertEqualC</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>print(&#34;&gt; expected&#34;, _expected)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>print(e)</pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>def assertEqualC(self, first, msg=None):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self.wrap_assert(self.assertEqual, first, msg)</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>def _shape_equal(self, first, second):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>a1 = np.asarray(first).squeeze()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>a2 = np.asarray(second).squeeze()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>msg = None</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-140591462169648\">\n <h4>File <cite class=\"filename\">\"/home/tuhe/Documents/unitgrade/src/unitgrade/framework.py\"</cite>,\n line <em class=\"line\">601</em>,\n in <code class=\"function\">wrap_assert</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span># The order of these calls is important. If the method assert fails, we should still store the correct result in cache.</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>cache[id] = first</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache_put(key, cache)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._assert_cache_index += 1</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if not self._setup_answers_mode:</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>assert_fun(first, _expected, *args, **kwargs)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>else:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>try:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>assert_fun(first, _expected, *args, **kwargs)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except Exception as e:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>print(&#34;Mumble grumble. Cache function failed during class setup. Most likely due to old cache. Re-run deploy to check it pass.&#34;, id)</pre></div>\n</div>\n</ul>\n <blockquote>AssertionError: 3 != &#39;Key 0 not found in cache; framework files missing. Please run deploy()&#39;\n</blockquote>\n</div>\n"}
\ No newline at end of file
{"run_id": 578953, "state": "fail", "coverage_files_changed": null, "stdout": [[0, "oh hello sexy. _testMethodName\noh hello sexy. test_bad\noh hello sexy. __class__\noh hello sexy. __unittest_expecting_failure__\nhi there __unittest_expecting_failure__\noh hello sexy. _callSetUp\noh hello sexy. _with_coverage\noh hello sexy. setUp\noh hello sexy. _callTestMethod\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _testMethodDoc\noh hello sexy. _cache_put\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. shortDescriptionStandard\noh hello sexy. _testMethodDoc\noh hello sexy. _testMethodName\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _cache2\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\n\u001b[31m\r 0%| | 0/100 [00:00<?, ?it/s]\u001b[37m"], [1, "\u001b[31m\r 10%|# | 10/100 [00:00<00:00, 93.07it/s]\u001b[37m\u001b[31m\r 20%|## | 20/100 [00:00<00:00, 91.92it/s]\u001b[37m"], [2, "\u001b[31m\r 30%|### | 30/100 [00:00<00:00, 91.77it/s]\u001b[37m\u001b[31m\r 40%|#### | 40/100 [00:00<00:00, 92.25it/s]\u001b[37m"], [3, "\u001b[31m\r 50%|##### | 50/100 [00:00<00:00, 92.44it/s]\u001b[37m"], [4, "\u001b[31m\r 60%|###### | 60/100 [00:00<00:00, 91.07it/s]\u001b[37m\u001b[31m\r 70%|####### | 70/100 [00:00<00:00, 90.76it/s]\u001b[37m"], [5, "\u001b[31m\r 80%|######## | 80/100 [00:00<00:00, 89.57it/s]\u001b[37m"], [6, "\u001b[31m\r 89%|########9 | 89/100 [00:01<00:00, 83.70it/s]\u001b[37m\u001b[31m\r 99%|#########9| 99/100 [00:01<00:00, 85.69it/s]\u001b[37m\u001b[31m\u001b[37m\u001b[31m\r100%|##########| 100/100 [00:01<00:00, 88.82it/s]\u001b[37m\u001b[31m\n\u001b[37moh hello sexy. assertEqual\noh hello sexy. _getAssertEqualityFunc\noh hello sexy. _type_equality_funcs\noh hello sexy. _baseAssertEqual\noh hello sexy. assertEqualC\noh hello sexy. wrap_assert\noh hello sexy. assertEqual\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. _cache_contains\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _cache_get\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _assert_cache_index\nWarning, framework missing cache index (('Numpy', 'test_bad'), 'assert') id = 0 - The test will be skipped for now.\noh hello sexy. _setup_answers_mode\noh hello sexy. _cache_put\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _assert_cache_index\noh hello sexy. _setup_answers_mode\noh hello sexy. _getAssertEqualityFunc\noh hello sexy. _baseAssertEqual\noh hello sexy. _formatMessage\noh hello sexy. longMessage\noh hello sexy. failureException\noh hello sexy. _callTearDown\noh hello sexy. tearDown\noh hello sexy. _with_coverage\noh hello sexy. doCleanups\noh hello sexy. _outcome\noh hello sexy. _cleanups\noh hello sexy. _feedErrorsToResult\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\noh hello sexy. _cache_contains\noh hello sexy. _ensure_cache_exists\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. _testMethodDoc\noh hello sexy. _testMethodDoc\noh hello sexy. cache_id\noh hello sexy. __class__\noh hello sexy. _testMethodName\n\u001b[92m>\n\u001b[92m> Hints (from 'test_bad')\n\u001b[92m> * Remember to properly de-indent your code.\n> * Do more stuff which works.\noh hello sexy. __class__\noh hello sexy. __class__\noh hello sexy. failureException\noh hello sexy. failureException\noh hello sexy. __class__\n"], [7, "oh hello sexy. _error_fed_during_run\n\u001b[31mTraceback (most recent call last):\n File \"C:\\Users\\tuhe\\AppData\\Local\\Programs\\Python\\Python310\\lib\\unittest\\case.py\", line 59, in testPartExecutor\n yield\n File \"C:\\Users\\tuhe\\AppData\\Local\\Programs\\Python\\Python310\\lib\\unittest\\case.py\", line 591, in run\n self._callTestMethod(testMethod)\n File \"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\", line 516, in _callTestMethod\n res = testMethod()\n File \"C:\\Users\\tuhe\\Documents\\unitgrade_private\\devel\\example_devel\\instructor\\cs108\\report_devel.py\", line 75, in test_bad\n self.assertEqualC(add(3, b))\n File \"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\", line 613, in assertEqualC\n self.wrap_assert(self.assertEqual, first, msg)\n File \"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\", line 601, in wrap_assert\n assert_fun(first, _expected, *args, **kwargs)\nAssertionError: 3 != 'Key 0 not found in cache; framework files missing. Please run deploy()'\n\u001b[37m"]], "wz_stacktrace": "<div class=\"traceback\">\n <h3>Traceback <em>(most recent call last)</em>:</h3>\n <ul><li><div class=\"frame\" id=\"frame-2375040634096\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\AppData\\Local\\Programs\\Python\\Python310\\lib\\unittest\\case.py\"</cite>,\n line <em class=\"line\">59</em>,\n in <code class=\"function\">testPartExecutor</code></h4>\n <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"> </span>@contextlib.contextmanager</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>def testPartExecutor(self, test_case, isTest=False):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>old_success = self.success</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self.success = True</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>try:</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>yield</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except KeyboardInterrupt:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>raise</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except SkipTest as e:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.success = False</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.skipped.append((test_case, str(e)))</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-2375040861680\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\AppData\\Local\\Programs\\Python\\Python310\\lib\\unittest\\case.py\"</cite>,\n line <em class=\"line\">591</em>,\n in <code class=\"function\">run</code></h4>\n <div class=\"source library\"><pre class=\"line before\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._callSetUp()</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if outcome.success:</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>outcome.expecting_failure = expecting_failure</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self, isTest=True):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self._callTestMethod(testMethod)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>outcome.expecting_failure = False</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>with outcome.testPartExecutor(self):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._callTearDown()</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self.doCleanups()</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-2375040861792\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\"</cite>,\n line <em class=\"line\">516</em>,\n in <code class=\"function\">_callTestMethod</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>self._ensure_cache_exists() # Make sure cache is there.</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if self._testMethodDoc is not None:</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache_put((self.cache_id(), &#39;title&#39;), self.shortDescriptionStandard())</pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache2[(self.cache_id(), &#39;assert&#39;)] = {}</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>res = testMethod()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>elapsed = time.time() - t</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._get_outcome()[ (self.cache_id(), &#34;return&#34;) ] = res</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>self._cache_put((self.cache_id(), &#34;time&#34;), elapsed)</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-2375040861904\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\Documents\\unitgrade_private\\devel\\example_devel\\instructor\\cs108\\report_devel.py\"</cite>,\n line <em class=\"line\">75</em>,\n in <code class=\"function\">test_bad</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>for i in tqdm(range(100)):</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span># print(&#34;The current number is&#34;, i)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>time.sleep(.01)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self.assertEqual(1, d[&#39;x1&#39;])</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>for b in range(10):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self.assertEqualC(add(3, b))</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>def test_weights(self):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>&#34;&#34;&#34;</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>Hints:</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-2375040862016\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\"</cite>,\n line <em class=\"line\">613</em>,\n in <code class=\"function\">assertEqualC</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span>print(&#34;&gt; expected&#34;, _expected)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>print(e)</pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"></span> </pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>def assertEqualC(self, first, msg=None):</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>self.wrap_assert(self.assertEqual, first, msg)</pre>\n<pre class=\"line after\"><span class=\"ws\"></span> </pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>def _shape_equal(self, first, second):</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>a1 = np.asarray(first).squeeze()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>a2 = np.asarray(second).squeeze()</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>msg = None</pre></div>\n</div>\n\n<li><div class=\"frame\" id=\"frame-2375040862128\">\n <h4>File <cite class=\"filename\">\"C:\\Users\\tuhe\\Documents\\unitgrade\\src\\unitgrade\\framework.py\"</cite>,\n line <em class=\"line\">601</em>,\n in <code class=\"function\">wrap_assert</code></h4>\n <div class=\"source \"><pre class=\"line before\"><span class=\"ws\"> </span># The order of these calls is important. If the method assert fails, we should still store the correct result in cache.</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>cache[id] = first</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._cache_put(key, cache)</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>self._assert_cache_index += 1</pre>\n<pre class=\"line before\"><span class=\"ws\"> </span>if not self._setup_answers_mode:</pre>\n<pre class=\"line current\"><span class=\"ws\"> </span>assert_fun(first, _expected, *args, **kwargs)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>else:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>try:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>assert_fun(first, _expected, *args, **kwargs)</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>except Exception as e:</pre>\n<pre class=\"line after\"><span class=\"ws\"> </span>print(&#34;Mumble grumble. Cache function failed during class setup. Most likely due to old cache. Re-run deploy to check it pass.&#34;, id)</pre></div>\n</div>\n</ul>\n <blockquote>AssertionError: 3 != &#39;Key 0 not found in cache; framework files missing. Please run deploy()&#39;\n</blockquote>\n</div>\n"}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment