Skip to content

Commit 9b71e5b

Browse files
kurtmckeemichaelmior
authored andcommitted
Remove tests that don't affect coverage and contribute nothing
1 parent 45d378e commit 9b71e5b

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

tests/test_create.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import copy
2-
from collections import namedtuple
32
from contextlib import nullcontext as does_not_raise
43

54
import pytest
65

76
from jsonpath_ng.ext import parse
87

9-
Params = namedtuple('Params', 'string initial_data insert_val target')
10-
118

129
@pytest.mark.parametrize(
1310
"string, initial_data, expected_result",
@@ -70,40 +67,3 @@ def test_unsupported_classes(string, initial_data, expectation):
7067
with expectation:
7168
result = jsonpath.update_or_create(initial_data, 42)
7269
assert result != copied_initial_data
73-
74-
75-
@pytest.mark.parametrize('string, initial_data, insert_val, target', [
76-
77-
Params(string='$.name[0].text',
78-
initial_data={},
79-
insert_val='Sir Michael',
80-
target={'name': [{'text': 'Sir Michael'}]}),
81-
82-
Params(string='$.name[0].given[0]',
83-
initial_data={'name': [{'text': 'Sir Michael'}]},
84-
insert_val='Michael',
85-
target={'name': [{'text': 'Sir Michael',
86-
'given': ['Michael']}]}),
87-
88-
Params(string='$.name[0].prefix[0]',
89-
initial_data={'name': [{'text': 'Sir Michael',
90-
'given': ['Michael']}]},
91-
insert_val='Sir',
92-
target={'name': [{'text': 'Sir Michael',
93-
'given': ['Michael'],
94-
'prefix': ['Sir']}]}),
95-
96-
Params(string='$.birthDate',
97-
initial_data={'name': [{'text': 'Sir Michael',
98-
'given': ['Michael'],
99-
'prefix': ['Sir']}]},
100-
insert_val='1943-05-05',
101-
target={'name': [{'text': 'Sir Michael',
102-
'given': ['Michael'],
103-
'prefix': ['Sir']}],
104-
'birthDate': '1943-05-05'}),
105-
])
106-
def test_build_doc(string, initial_data, insert_val, target):
107-
jsonpath = parse(string)
108-
result = jsonpath.update_or_create(initial_data, insert_val)
109-
assert result == target

0 commit comments

Comments
 (0)