Skip to content

Commit 670bd3f

Browse files
committed
[feature] continue adding more tests
1 parent 1fd096d commit 670bd3f

File tree

1 file changed

+138
-2
lines changed

1 file changed

+138
-2
lines changed

tests/test.py

Lines changed: 138 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ def function2(uselessArg):
220220
"num1": "int"
221221
}
222222
])
223-
print("fsdqfsdqfsdqf")
224-
print(test[0])
225223
self.assertEqual(test, [
226224
[
227225
"4",
@@ -516,6 +514,144 @@ def test_complex_json_4(self):
516514
"num3": "9"
517515
}
518516
])
517+
def test_complex_json_5(self):
518+
test = parseFile("./tests/simple_complexe.csv", {
519+
"hello": [
520+
{
521+
"num4": "int",
522+
"num1": "string"
523+
}
524+
],
525+
"hello2": [
526+
{
527+
"num4": "int",
528+
"num1": [
529+
{
530+
"num3": "string"
531+
}
532+
]
533+
}
534+
]
535+
})
536+
self.assertEqual(test, [
537+
{
538+
"hello": [
539+
{
540+
"num4": 4,
541+
"num1": "1"
542+
}
543+
],
544+
"hello2": [
545+
{
546+
"num4": 4,
547+
"num1": [
548+
{
549+
"num3": "3"
550+
}
551+
]
552+
}
553+
]
554+
},
555+
{
556+
"hello": [
557+
{
558+
"num4": 7,
559+
"num1": "4"
560+
}
561+
],
562+
"hello2": [
563+
{
564+
"num4": 7,
565+
"num1": [
566+
{
567+
"num3": "6"
568+
}
569+
]
570+
}
571+
]
572+
},
573+
{
574+
"hello": [
575+
{
576+
"num4": 10,
577+
"num1": "7"
578+
}
579+
],
580+
"hello2": [
581+
{
582+
"num4": 10,
583+
"num1": [
584+
{
585+
"num3": "9"
586+
}
587+
]
588+
}
589+
]
590+
}
591+
])
592+
def test_complex_json_6(self):
593+
test = parseFile("./tests/simple_complexe.csv", {
594+
"hello": [
595+
{
596+
"num4": "int",
597+
"num1": "string"
598+
}
599+
],
600+
"hello2": [
601+
[
602+
{
603+
"num3": "string"
604+
}
605+
]
606+
]
607+
})
608+
self.assertEqual(test, [
609+
{
610+
"hello": [
611+
{
612+
"num4": 4,
613+
"num1": "1"
614+
}
615+
],
616+
"hello2": [
617+
[
618+
{
619+
"num3": "3"
620+
}
621+
]
622+
]
623+
},
624+
{
625+
"hello": [
626+
{
627+
"num4": 7,
628+
"num1": "4"
629+
}
630+
],
631+
"hello2": [
632+
[
633+
{
634+
"num3": "6"
635+
}
636+
]
637+
]
638+
},
639+
{
640+
"hello": [
641+
{
642+
"num4": 10,
643+
"num1": "7"
644+
}
645+
],
646+
"hello2": [
647+
[
648+
{
649+
"num3": "9"
650+
}
651+
]
652+
]
653+
}
654+
])
519655

520656
if __name__ == '__main__':
521657
unittest.main()

0 commit comments

Comments
 (0)