Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix for tests. #785

Merged
merged 1 commit into from
Jul 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def tearDown(self):
def test_no_sim_reports(self):
p = setup_model_radau(do_reports=False)

report_subdirs = [e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()])

# Test that a report subdir was made
self.assertEqual(len(report_subdirs), 1)
Expand All @@ -167,7 +167,7 @@ def test_no_sim_reports(self):
def test_make_sim_reports(self):
p = setup_model_radau(do_reports=True)

report_subdirs = [e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()])

# Test that a report subdir was made
# # There is the nominal problem, the simulation problem, and a subproblem for each segment in the simulation.
Expand All @@ -181,7 +181,7 @@ def test_make_sim_reports(self):
def test_explicitshooting_no_subprob_reports(self):
p = setup_model_shooting(do_reports=False)

report_subdirs = [e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()])

# Test that a report subdir was made
self.assertEqual(len(report_subdirs), 1)
Expand All @@ -195,7 +195,7 @@ def test_explicitshooting_no_subprob_reports(self):
def test_explicitshooting_make_subprob_reports(self):
p = setup_model_shooting(do_reports=True)

report_subdirs = [e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(get_reports_dir()).iterdir() if e.is_dir()])

# Test that a report subdir was made
# There is the nominal problem, a subproblem for integration, and a subproblem for the derivatives.
Expand Down Expand Up @@ -246,7 +246,7 @@ def test_no_sim_reports(self):
p = setup_model_radau(do_reports=False)

problem_reports_dir = pathlib.Path(_reports_dir).joinpath(p._name)
report_subdirs = [e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()])

# Test that a report subdir was made
self.assertEqual(len(report_subdirs), 1)
Expand All @@ -262,7 +262,7 @@ def test_make_sim_reports(self):

p = setup_model_radau(do_reports=True)

report_subdirs = [e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()])

# Test that a report subdir was made
# # There is the nominal problem, the simulation problem, and a subproblem for each segment in the simulation.
Expand All @@ -279,7 +279,7 @@ def test_explicitshooting_no_subprob_reports(self):
p = setup_model_shooting(do_reports=False)

problem_reports_dir = pathlib.Path(_reports_dir).joinpath(p._name)
report_subdirs = [e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()])

# Test that a report subdir was made
self.assertEqual(len(report_subdirs), 1)
Expand All @@ -296,7 +296,7 @@ def test_explicitshooting_make_subprob_reports(self):
p = setup_model_shooting(do_reports=True)

problem_reports_dir = pathlib.Path(_reports_dir).joinpath(p._name)
report_subdirs = [e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()]
report_subdirs = sorted([e for e in pathlib.Path(_reports_dir).iterdir() if e.is_dir()])

# Test that a report subdir was made
# There is the nominal problem, a subproblem for integration, and a subproblem for the derivatives.
Expand Down