mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 22:39:42 +08:00
fix: keep negative index in jmespath unchanged when converting pytest files
This commit is contained in:
@@ -45,6 +45,10 @@ class TestCompat(unittest.TestCase):
|
||||
compat._convert_jmespath("body.data.buildings.0.building_id"),
|
||||
"body.data.buildings[0].building_id",
|
||||
)
|
||||
self.assertEqual(
|
||||
compat._convert_jmespath("body.users[-1]"),
|
||||
"body.users[-1]",
|
||||
)
|
||||
with self.assertRaises(SystemExit):
|
||||
compat._convert_jmespath("2.buildings.0.building_id")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user