Skip to content

Commit

Permalink
Merge pull request #10 from telefonicasc/extra-test
Browse files Browse the repository at this point in the history
ADD additional test case in test_context_as_argumnet.py
  • Loading branch information
arcosa authored Mar 12, 2024
2 parents 2e6396d + ba4fdfd commit 37cd0c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_context_as_argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ def test_context_as_argument(self):

result = jexl.evaluate(expression, context2)
self.assertEqual(result, False)

def test_context_as_argument_2(self):
jexl = JEXL()

context = {"S": "a given string", "init": 2, "finish": 5}
expression = 'S|substring(init,finish)'

result = jexl.evaluate(expression, context)
self.assertEqual(result, 'giv')

0 comments on commit 37cd0c3

Please sign in to comment.