'VSCode ignoring results of some tests and not showing tests passes percentage
I'm trying to create a test for a specific method in my application however while the test passes it's not recognized in the VSCode testing extension.
class Test_TestSendDataController(TestCase):
def test_geochat_sending(self):
self.client_sock = socket.socket
self.client_sock.send = mock.MagicMock(return_value = None)
self.clientInformationQueue = {"testuid": self.client_sock}
processed_cot = RawCoT()
processed_cot.xmlString = "testString"
processed_cot.modelObject = Event.GeoChat()
processed_cot.modelObject.detail._chat.chatgrp.uid1 = "testuid"
queue = Queue()
queue.put = mock.MagicMock(return_value=None)
SendDataController().geochat_sending(self.clientInformationQueue, processed_cot, None, queue)
self.client_sock.send.assert_called_with(processed_cot.xmlString)
queue.put.assert_called_once_with(processed_cot)
assert(True, True)
def test_other(self):
assert(False, True)
if __name__ == '__main__':
unittest.main()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

