Skip to content

Commit

Permalink
check pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
debpal committed Sep 11, 2024
1 parent eb28aca commit eddc0c4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_nse_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit eddc0c4

Please sign in to comment.