Commit 9f1a3618 authored by Domanski, Marian M.'s avatar Domanski, Marian M.
Browse files

remove test which used private interface of tested class

parent 4365048e
......@@ -125,48 +125,6 @@ class TestRASProject(unittest.TestCase):
project.close()
def test_ras_units_conversion(self):
# Tets RAS unit conversions
project = self._create_ras_project_unsteady()
self.assertEqual(project._n_conversion, 1.4859)
ras_data = project._get_data_from_ras(1)
shear_velocity = project._calc_shear_velocity(ras_data)
profile_data = project._get_profile_data(1, 22)
feet_to_meters = (2.54 * 12) / 100
self.assertEqual(
shear_velocity[1] * feet_to_meters,
profile_data['Ustar_mps'][1])
self.assertEqual(
ras_data['Hydr Depth C'][1] * feet_to_meters,
profile_data['Depth_m'][1])
self.assertEqual(
ras_data['Vel Chnl'][1] * feet_to_meters,
profile_data['Vmag_mps'][1])
self.assertAlmostEqual(
ras_data['ChannelDist'][2] * feet_to_meters / 1000 / 2,
profile_data['CumlDistance_km'][2])
self.assertEqual(
ras_data['Q Channel'][1] * feet_to_meters ** 3,
profile_data['Q_cms'][1])
manning_values = ras_data['Mann Wtd Chnl'].values
hydraulic_radius = ras_data['Hydr Radius C'].values
channel_velocity = ras_data['Vel Chnl']
ks = (8.1 * (manning_values / project._n_conversion)
* np.sqrt(project._gravity))**6
shear_velocity = np.abs(
channel_velocity /
(8.1 * ((hydraulic_radius / ks) ** (1 / 6))))
shear_velocity *= feet_to_meters
self.assertEqual(shear_velocity.all(),
profile_data['Ustar_mps'].all())
project.close()
if __name__ == '__main__':
unittest.main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment