Skip to content

Commit

Permalink
Extract setup of reference directory to method
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusfuchs committed Nov 18, 2020
1 parent 707869c commit 0cc6b95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions buildingspy/development/regressiontest.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,20 @@ def setLibraryRoot(self, rootDir):
self._rootPackage = os.path.join(self._libHome, 'Resources', 'Scripts', 'Dymola')
self.isValidLibrary(self._libHome)

self._set_up_reference_directory()


def _set_up_reference_directory(self):
""" Set up the directory for the reference results.
During initialization, ``self.dir_ref`` is either set to the default ``None``
or a custom directory path. For the default, the standard path at
``self._libHome\\Resources\\ReferenceResults\\Dymola`` can only be set up after
``self._libHome`` has been set. Otherwise, the originally passed custom
path is used. In both cases, the directory is created if it does not exist,
yet.
"""

if self.dir_ref is None:
self.dir_ref = os.path.join(
self._libHome, 'Resources', 'ReferenceResults', 'Dymola'
Expand Down

0 comments on commit 0cc6b95

Please sign in to comment.