Skip to content

Commit

Permalink
Test added to ensure failed simulation is handled correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeee committed Aug 20, 2019
1 parent 7c59d1a commit c27f7db
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 176 deletions.
2 changes: 1 addition & 1 deletion buildstockbatch/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_factor(folder):
with fs.open(full_path, 'rb') as f:
file1 = pd.read_parquet(f, engine='pyarrow').set_index('Time')
file1 = file1 * get_factor(inp1)
except ResourceNotFound as er:
except ResourceNotFound:
file1 = pd.DataFrame() # if the timeseries file is missing, set it to empty dataframe
else:
file1 = inp1
Expand Down
2 changes: 1 addition & 1 deletion buildstockbatch/test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_missing_simulation_output_report_applicable(basic_residential_project_f
up01_parquet = os.path.join(results_dir, 'parquet', 'upgrades', 'upgrade=1', 'results_up01.parquet')
assert(os.path.exists(up01_parquet))
df = pd.read_parquet(up01_parquet, engine='pyarrow')
assert((~df['simulation_output_report.applicable']).any())
assert(not df['simulation_output_report.applicable'].any())


def test_combine_files_flexible(basic_residential_project_file):
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified buildstockbatch/test/test_results/results_csvs/results_up01.csv.gz
Binary file not shown.

Large diffs are not rendered by default.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Failed Workflow 2019-04-17 17:32:31 +0000

This file was deleted.

0 comments on commit c27f7db

Please sign in to comment.