diff --git a/comtypes/test/test_dispifc_records.py b/comtypes/test/test_dispifc_records.py index 665f6573..d474cb39 100644 --- a/comtypes/test/test_dispifc_records.py +++ b/comtypes/test/test_dispifc_records.py @@ -18,7 +18,7 @@ @unittest.skipIf(IMPORT_FAILED, "This depends on the out of process COM-server.") -class Test(unittest.TestCase): +class Test_Disp(unittest.TestCase): """Test dispmethods with record and record pointer parameters.""" EXPECTED_INITED_QUESTIONS = "The meaning of life, the universe and everything?" @@ -31,7 +31,7 @@ def _create_dispifc(self) -> "ComtypesCppTestSrvLib.IDispRecordParamTest": interface=ComtypesCppTestSrvLib.IDispRecordParamTest, ) - def test_byref(self): + def test_inout_byref(self): dispifc = self._create_dispifc() # Passing a record by reference to a method that has declared the parameter # as [in, out] we expect modifications of the record on the server side to @@ -45,7 +45,7 @@ def test_byref(self): self.assertEqual(test_record.answer, 42) self.assertEqual(test_record.needs_clarification, True) - def test_pointer(self): + def test_inout_pointer(self): dispifc = self._create_dispifc() # Passing a record pointer to a method that has declared the parameter # as [in, out] we expect modifications of the record on the server side to @@ -59,7 +59,18 @@ def test_pointer(self): self.assertEqual(test_record.answer, 42) self.assertEqual(test_record.needs_clarification, True) - def test_record(self): + def test_inout_record(self): + dispifc = self._create_dispifc() + test_record = ComtypesCppTestSrvLib.StructRecordParamTest() + self.assertEqual(test_record.question, None) + self.assertEqual(test_record.answer, 0) + self.assertEqual(test_record.needs_clarification, False) + dispifc.InitRecord(test_record) + self.assertEqual(test_record.question, self.EXPECTED_INITED_QUESTIONS) + self.assertEqual(test_record.answer, 42) + self.assertEqual(test_record.needs_clarification, True) + + def test_in_record(self): # Passing a record to a method that has declared the parameter just as [in] # we expect modifications of the record on the server side NOT to change # the record on the client side. @@ -98,7 +109,7 @@ def _create_dualifc(self) -> "ComtypesCppTestSrvLib.IDualRecordParamTest": interface=ComtypesCppTestSrvLib.IDualRecordParamTest, ) - def test_internal_byref(self): + def test_inout_record(self): dualifc = self._create_dualifc() # Passing a record by reference to a method that has declared the parameter # as [in, out] we expect modifications of the record on the server side to @@ -116,7 +127,7 @@ def test_internal_byref(self): self.assertEqual(test_record.needs_clarification, True) faulthandler.disable() - def test_pointer(self): + def test_inout_pointer(self): dualifc = self._create_dualifc() # Passing a record pointer to a method that has declared the parameter # as [in, out] we expect modifications of the record on the server side to @@ -130,7 +141,7 @@ def test_pointer(self): self.assertEqual(test_record.answer, 42) self.assertEqual(test_record.needs_clarification, True) - def test_record(self): + def test_in_record(self): # Passing a record to a method that has declared the parameter just as [in] # we expect modifications of the record on the server side NOT to change # the record on the client side.