Skip to content

Commit

Permalink
Merge pull request #18 from VirtualPlanetaryLaboratory/BPCompat
Browse files Browse the repository at this point in the history
Reinserted calls to multiplanet in tests.
  • Loading branch information
RoryBarnes authored Sep 27, 2023
2 parents b5b83b2 + fd1e73c commit 7785edf
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions tests/Bigplanet/test_bigplanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def test_bigplanet():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
#subprocess.check_output(["multiplanet", "vspace.in", "-bp"], cwd=path)
subprocess.check_output(["multiplanet", "vspace.in", "-bp"], cwd=path)

#file = path / "MP_Bigplanet.bpa"
file = path / "MP_Bigplanet.bpa"

#assert os.path.isfile(file) == True
assert os.path.isfile(file) == True


if __name__ == "__main__":
Expand Down
14 changes: 7 additions & 7 deletions tests/Checkpoint/test_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def test_checkpoint():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)

# # Gets list of folders
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# Gets list of folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')
for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')

if __name__ == "__main__":
test_checkpoint()
16 changes: 8 additions & 8 deletions tests/MpStatus/test_mpstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ def test_mpstatus():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet and mpstatus
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
# subprocess.check_output(["mpstatus", "vspace.in"], cwd=path)
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
subprocess.check_output(["mpstatus", "vspace.in"], cwd=path)

# # Get list of folders
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# Get list of folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile("earth.earth.forward") == True
# os.chdir("../")
for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile("earth.earth.forward") == True
os.chdir("../")


if __name__ == "__main__":
Expand Down
12 changes: 6 additions & 6 deletions tests/Parallel/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def test_parallel():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)

# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')
for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')

if __name__ == "__main__":
test_parallel()
12 changes: 6 additions & 6 deletions tests/Serial/test_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def test_serial():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
# subprocess.check_output(["multiplanet", "vspace.in", "-c", "1"], cwd=path)
subprocess.check_output(["multiplanet", "vspace.in", "-c", "1"], cwd=path)

# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')
for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')

if __name__ == "__main__":
test_serial()

0 comments on commit 7785edf

Please sign in to comment.