Skip to content

Commit

Permalink
Merge pull request #3202 from eytanadler/fix_hotstart
Browse files Browse the repository at this point in the history
Fix pyOptSparse `hotstart_file` `@property` method
  • Loading branch information
swryan committed Apr 24, 2024
2 parents b172b21 + 1394b59 commit 3eab709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openmdao/drivers/pyoptsparse_driver.py
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions openmdao/drivers/tests/test_pyoptsparse_driver.py
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 3eab709

Please sign in to comment.