diff options
author | Prabhu Ramachandran | 2017-11-10 17:50:48 +0530 |
---|---|---|
committer | GitHub | 2017-11-10 17:50:48 +0530 |
commit | 96f8e0af5b39338741c758de918e32e02b95f0c8 (patch) | |
tree | 80fb17501e7995ed3abb34ac3b0d62dd8decc560 /yaksh/tests/test_code_server.py | |
parent | cfcb2ed39c724639fe17338e29e327d08ae641b2 (diff) | |
parent | 95f862caee8ca6077ee8f9a8fc88d9ca44db1cdf (diff) | |
download | online_test-96f8e0af5b39338741c758de918e32e02b95f0c8.tar.gz online_test-96f8e0af5b39338741c758de918e32e02b95f0c8.tar.bz2 online_test-96f8e0af5b39338741c758de918e32e02b95f0c8.zip |
Merge pull request #380 from maheshgudi/beautify_assertions
Prettify assertion error output
Diffstat (limited to 'yaksh/tests/test_code_server.py')
-rw-r--r-- | yaksh/tests/test_code_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/tests/test_code_server.py b/yaksh/tests/test_code_server.py index 5f80f2d..1309624 100644 --- a/yaksh/tests/test_code_server.py +++ b/yaksh/tests/test_code_server.py @@ -61,7 +61,7 @@ class TestCodeServer(unittest.TestCase): # Then data = json.loads(result.get('result')) self.assertFalse(data['success']) - self.assertTrue('infinite loop' in data['error'][0]) + self.assertTrue('infinite loop' in data['error'][0]['message']) def test_correct_answer(self): # Given @@ -104,7 +104,7 @@ class TestCodeServer(unittest.TestCase): # Then data = json.loads(result.get('result')) self.assertFalse(data['success']) - self.assertTrue('AssertionError' in data['error'][0]) + self.assertTrue('AssertionError' in data['error'][0]['exception']) def test_multiple_simultaneous_hits(self): # Given @@ -143,7 +143,7 @@ class TestCodeServer(unittest.TestCase): for i in range(N): data = results.get() self.assertFalse(data['success']) - self.assertTrue('infinite loop' in data['error'][0]) + self.assertTrue('infinite loop' in data['error'][0]['message']) def test_server_pool_status(self): # Given |