Skip to content

Commit

Permalink
Updates to python scripts for regression tests (#370)
Browse files Browse the repository at this point in the history
- Added `WP_Baseline` to list of directories to copy
- Replaced `is` and `is not` with `==` and `!=` when comparing with a string literal (else they would always return false)
  • Loading branch information
bjonkman authored and rafmudaf committed Dec 11, 2019
1 parent 7571e58 commit 2ff0fb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions reg_tests/executeOpenfastRegressionCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def ignoreBaselineItems(directory, contents):

# create the local output directory if it does not already exist
# and initialize it with input files for all test cases
for data in ["AOC", "AWT27", "SWRT", "UAE_VI"]:
for data in ["AOC", "AWT27", "SWRT", "UAE_VI", "WP_Baseline"]:
dataDir = os.path.join(buildDirectory, data)
if not os.path.isdir(dataDir):
shutil.copytree(os.path.join(moduleDirectory, data), dataDir)
Expand All @@ -132,7 +132,7 @@ def ignoreBaselineItems(directory, contents):
else:
names = os.listdir(src)
for name in names:
if name is "ServoData":
if name == "ServoData":
continue
srcname = os.path.join(src, name)
dstname = os.path.join(dst, name)
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/manualRegressionTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def strFormat(string):
outstd = sys.stdout if verbose else open(os.devnull, 'w')
pythonCommand = sys.executable

if case is not "":
if case != "":
caselist = [case]
else:
with open(os.path.join("r-test", "glue-codes", "openfast", "CaseList.md")) as listfile:
Expand Down

0 comments on commit 2ff0fb1

Please sign in to comment.