Skip to content

Commit

Permalink
Add test functions for xs flow and xs energy grade funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevenray Janke committed Jun 19, 2024
1 parent d8718a0 commit 64d14d6
Show file tree
Hide file tree
Showing 3 changed files with 368 additions and 0 deletions.
177 changes: 177 additions & 0 deletions tests/data/json/xs_energy_grade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"Big": {
"0": 70.75,
"1": 70.54,
"2": 70.48,
"3": 70.45,
"4": 70.4,
"5": 70.37,
"6": 70.34,
"7": 70.33,
"8": 70.31,
"9": 70.29,
"10": 70.24,
"11": 70.2,
"12": 70.07,
"13": 69.96,
"14": 69.75,
"15": 69.4,
"16": 69.28,
"17": 69.21,
"18": 69.05,
"19": 68.83,
"20": 68.65,
"21": 68.46,
"22": 68.2,
"23": 67.85,
"24": 67.35,
"25": 67.03,
"26": 66.91,
"27": 66.53,
"28": 66.08,
"29": 65.92,
"30": 65.86,
"31": 65.79,
"32": 65.73,
"33": 65.66,
"34": 65.62,
"35": 65.54,
"36": 65.51,
"37": 65.42,
"38": 65.31,
"39": 65.18,
"40": 65.03,
"41": 64.96,
"42": 64.78,
"43": 64.64,
"44": 64.57,
"45": 64.46,
"46": 64.39,
"47": 64.33,
"48": 64.22,
"49": 64.1,
"50": 64.03,
"51": 63.91,
"52": 63.83,
"53": 63.74,
"54": 63.65,
"55": 63.53,
"56": 63.47,
"57": 63.36,
"58": 63.27,
"59": 63.14,
"60": 63.04,
"61": 62.93,
"62": 62.83,
"63": 62.76,
"64": 62.89,
"65": 62.89,
"66": 62.88,
"67": 62.88,
"68": 62.88,
"69": 62.87,
"70": 62.87,
"71": 62.87,
"72": 62.87,
"73": 62.87,
"74": 62.87,
"75": 62.87,
"76": 62.87,
"77": 62.87,
"78": 62.87,
"79": 62.87,
"80": 62.87,
"81": 62.87,
"82": 62.87,
"83": 62.87,
"84": 62.87,
"85": 62.87,
"86": 62.87,
"87": 62.87,
"88": 62.87,
"89": 62.66,
"90": 62.63,
"91": 62.58,
"92": 62.52,
"93": 62.5,
"94": 62.38,
"95": 62.37,
"96": 62.29,
"97": 62.17,
"98": 62.02,
"99": 61.87,
"100": 61.78,
"101": 61.74,
"102": 61.69,
"103": 61.63,
"104": 61.58,
"105": 61.53,
"106": 61.41,
"107": 61.21,
"108": 61.0,
"109": 60.87,
"110": 60.81,
"111": 60.67,
"112": 60.34,
"113": 60.18,
"114": 60.06,
"115": 59.83,
"116": 59.72,
"117": 59.54,
"118": 59.36,
"119": 59.11,
"120": 58.99,
"121": 58.76,
"122": 58.55,
"123": 58.45,
"124": 58.33,
"125": 58.07,
"126": 57.75,
"127": 57.49,
"128": 57.33,
"129": 56.92,
"130": 56.57,
"131": 56.29,
"132": 56.11,
"133": 55.72,
"134": 55.47,
"135": 55.29,
"136": 55.12,
"137": 54.88,
"138": 54.47,
"139": 54.03,
"140": 53.72,
"141": 53.48,
"142": 53.19,
"143": 53.02,
"144": 52.89,
"145": 52.73,
"146": 52.63,
"147": 52.48,
"148": 52.32,
"149": 52.08,
"150": 51.92,
"151": 51.78,
"152": 51.37,
"153": 51.09,
"154": 50.67,
"155": 50.41,
"156": 50.22,
"157": 49.88,
"158": 49.55,
"159": 49.02,
"160": 48.8,
"161": 48.64,
"162": 48.38,
"163": 48.27,
"164": 48.16,
"165": 47.89,
"166": 47.63,
"167": 46.98,
"168": 46.28,
"169": 45.28,
"170": 44.69,
"171": 44.22,
"172": 43.81
}
}
177 changes: 177 additions & 0 deletions tests/data/json/xs_flow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"Big": {
"0": 31500.0,
"1": 31500.0,
"2": 31500.0,
"3": 31500.0,
"4": 31500.0,
"5": 31500.0,
"6": 31500.0,
"7": 31500.0,
"8": 31500.0,
"9": 31500.0,
"10": 31500.0,
"11": 31500.0,
"12": 31500.0,
"13": 31500.0,
"14": 31500.0,
"15": 31500.0,
"16": 31500.0,
"17": 31500.0,
"18": 31500.0,
"19": 31500.0,
"20": 31500.0,
"21": 31500.0,
"22": 31500.0,
"23": 31500.0,
"24": 31500.0,
"25": 31500.0,
"26": 31500.0,
"27": 31500.0,
"28": 31500.0,
"29": 31500.0,
"30": 31500.0,
"31": 31500.0,
"32": 31500.0,
"33": 31500.0,
"34": 31500.0,
"35": 31500.0,
"36": 31500.0,
"37": 31500.0,
"38": 31500.0,
"39": 31500.0,
"40": 31500.0,
"41": 31500.0,
"42": 31500.0,
"43": 31500.0,
"44": 31500.0,
"45": 31500.0,
"46": 31500.0,
"47": 31500.0,
"48": 31500.0,
"49": 31500.0,
"50": 31500.0,
"51": 31500.0,
"52": 31500.0,
"53": 31500.0,
"54": 31500.0,
"55": 31500.0,
"56": 31500.0,
"57": 31500.0,
"58": 31500.0,
"59": 31500.0,
"60": 31500.0,
"61": 31500.0,
"62": 31500.0,
"63": 31500.0,
"64": 500.0,
"65": 500.0,
"66": 500.0,
"67": 500.0,
"68": 500.0,
"69": 500.0,
"70": 500.0,
"71": 500.0,
"72": 500.0,
"73": 500.0,
"74": 500.0,
"75": 500.0,
"76": 500.0,
"77": 500.0,
"78": 500.0,
"79": 500.0,
"80": 500.0,
"81": 500.0,
"82": 500.0,
"83": 500.0,
"84": 500.0,
"85": 500.0,
"86": 500.0,
"87": 500.0,
"88": 500.0,
"89": 32000.0,
"90": 32000.0,
"91": 32000.0,
"92": 32000.0,
"93": 32000.0,
"94": 32000.0,
"95": 32000.0,
"96": 32000.0,
"97": 32000.0,
"98": 32000.0,
"99": 32000.0,
"100": 32000.0,
"101": 32000.0,
"102": 32000.0,
"103": 32000.0,
"104": 32000.0,
"105": 32000.0,
"106": 32000.0,
"107": 32000.0,
"108": 32000.0,
"109": 32000.0,
"110": 32000.0,
"111": 32000.0,
"112": 32000.0,
"113": 32000.0,
"114": 32000.0,
"115": 32000.0,
"116": 32000.0,
"117": 32000.0,
"118": 32000.0,
"119": 32000.0,
"120": 32000.0,
"121": 32000.0,
"122": 32000.0,
"123": 32000.0,
"124": 32000.0,
"125": 32000.0,
"126": 32000.0,
"127": 32000.0,
"128": 32000.0,
"129": 32000.0,
"130": 32000.0,
"131": 32000.0,
"132": 32000.0,
"133": 32000.0,
"134": 32000.0,
"135": 32000.0,
"136": 32000.0,
"137": 32000.0,
"138": 32000.0,
"139": 32000.0,
"140": 32000.0,
"141": 32000.0,
"142": 32000.0,
"143": 32000.0,
"144": 32000.0,
"145": 32000.0,
"146": 32000.0,
"147": 32000.0,
"148": 32000.0,
"149": 32000.0,
"150": 32000.0,
"151": 32000.0,
"152": 32000.0,
"153": 32000.0,
"154": 32000.0,
"155": 32000.0,
"156": 32000.0,
"157": 32000.0,
"158": 32000.0,
"159": 32000.0,
"160": 32000.0,
"161": 32000.0,
"162": 32000.0,
"163": 32000.0,
"164": 32000.0,
"165": 32000.0,
"166": 32000.0,
"167": 32000.0,
"168": 32000.0,
"169": 32000.0,
"170": 32000.0,
"171": 32000.0,
"172": 32000.0
}
}
14 changes: 14 additions & 0 deletions tests/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,17 @@ def test_cross_sections_additional_enc_station_left():
def test_cross_sections_additional_enc_station_left_not_found():
with RasPlanHdf(COAL_G01) as phdf:
assert (phdf.cross_sections_additional_enc_station_left(), None)


def test_cross_sections_flow():
xs_flow_json = TEST_JSON / "xs_flow.json"
with RasPlanHdf(BAXTER_P01) as phdf:
assert _gdf_matches_json_alt(phdf.cross_sections_flow(), xs_flow_json)


def test_cross_sections_energy_grade():
xs_energy_grade_json = TEST_JSON / "xs_energy_grade.json"
with RasPlanHdf(BAXTER_P01) as phdf:
assert _gdf_matches_json_alt(
phdf.cross_sections_energy_grade(), xs_energy_grade_json
)

0 comments on commit 64d14d6

Please sign in to comment.