diff --git a/openmdao/drivers/pyoptsparse_driver.py b/openmdao/drivers/pyoptsparse_driver.py index 35207e6393..1115143739 100644 --- a/openmdao/drivers/pyoptsparse_driver.py +++ b/openmdao/drivers/pyoptsparse_driver.py @@ -306,7 +306,7 @@ def hotstart_file(self): """ warn_deprecation("The 'hotstart_file' attribute is deprecated. " "Use the 'hotstart_file' option instead.") - return self.options['hist_file'] + return self.options['hotstart_file'] @hotstart_file.setter def hotstart_file(self, file_name): diff --git a/openmdao/drivers/tests/test_pyoptsparse_driver.py b/openmdao/drivers/tests/test_pyoptsparse_driver.py index 0bebf34805..1cd41661ef 100644 --- a/openmdao/drivers/tests/test_pyoptsparse_driver.py +++ b/openmdao/drivers/tests/test_pyoptsparse_driver.py @@ -2816,7 +2816,7 @@ def test_hist_file_hotstart_deprecated(self): with assert_warning(OMDeprecationWarning, msg): driver.hist_file = filename with assert_warning(OMDeprecationWarning, msg): - driver.hist_file + self.assertEqual(driver.hist_file, filename) self.assertEqual(driver.options['hist_file'], filename) prob.setup() @@ -2833,7 +2833,7 @@ def test_hist_file_hotstart_deprecated(self): with assert_warning(OMDeprecationWarning, msg): driver.hotstart_file = filename with assert_warning(OMDeprecationWarning, msg): - driver.hotstart_file + self.assertEqual(driver.hotstart_file, filename) self.assertEqual(driver.options['hotstart_file'], filename) prob.setup()