From eddc0c42122e1f652023b634e91bb9751e0a65d4 Mon Sep 17 00:00:00 2001 From: Debasish Pal <48341250+debpal@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:41:12 +0300 Subject: [PATCH] check pytest --- tests/test_nse_track.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_nse_track.py b/tests/test_nse_track.py index b90b135..0f3d3e5 100644 --- a/tests/test_nse_track.py +++ b/tests/test_nse_track.py @@ -53,3 +53,16 @@ def test_get_index_base_value( with pytest.raises(Exception) as exc_info: class_instance.get_index_base_value('non-existence') assert exc_info.value.args[0] == 'Invalid index: non-existence' + + +def test_get_index_base_value_new( + class_instance +): + + assert class_instance.get_index_base_value('NIFTY 50') == 1000.0 + assert class_instance.get_index_base_value('NIFTY IT') == 100.0 + + # error test + with pytest.raises(Exception) as exc_info: + class_instance.get_index_base_value('non-existence') + assert exc_info.value.args[0] == 'Invalid index: non-existence'