-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Tests into one test file per mzn file
- Loading branch information
1 parent
74de3ff
commit 405e215
Showing
10 changed files
with
324 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
from jetisu.idr_query import idr_query, idr_test_res_sort | ||
|
||
|
||
def test_idr_d750d38a4a(): | ||
res = idr_query("""select price, duty from ACT_Conveyance_Duty where price = 1200000 and eligible_owner_occupier; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('price', 'duty'), [(1200000.0, 47590)])) | ||
|
||
|
||
def test_idr_0a5180a61c(): | ||
res = idr_query("""select price, duty from ACT_Conveyance_Duty where price = 1200000 and not non_commercial; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('price', 'duty'), [(1200000.0, 0.0)])) | ||
|
||
|
||
def test_idr_65378a8e35(): | ||
res = idr_query("""select eligible_owner_occupier, duty | ||
from ACT_Conveyance_Duty | ||
where price = 1200000 and non_commercial; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('eligible_owner_occupier', 'duty'), [(True, 47590), (False, 49750)])) | ||
|
||
|
||
def test_idr_347d205d95(): | ||
res = idr_query(""" | ||
select * from ACT_Conveyance_Duty where price = 1200000; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('non_commercial', 'eligible_owner_occupier', 'price', 'duty'), | ||
[(False, False, 1200000.0, 0), (True, True, 1200000.0, 47590), | ||
(True, False, 1200000.0, 49750)])) | ||
|
||
|
||
def test_idr_689c1ce3d5(): | ||
res = idr_query(""" | ||
select * from ACT_Conveyance_Duty where price = 2000000; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('non_commercial', 'eligible_owner_occupier', 'price', 'duty'), | ||
[(True, True, 2000000.0, 90800), (True, False, 2000000.0, 90800), | ||
(False, False, 2000000.0, 100000)])) | ||
|
||
|
||
def test_idr_4ab4e9269f(): | ||
res = idr_query(""" | ||
select price from ACT_Conveyance_Duty where duty = 50150 and eligible_owner_occupier; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('price',), | ||
[(1240000,), (1239901,), (1239902,), (1239903,), (1239904,), (1239905,), | ||
(1239906,), (1239907,), (1239908,), (1239909,), (1239910,), (1239911,), | ||
(1239912,), (1239913,), (1239914,), (1239915,), (1239916,), (1239917,), | ||
(1239918,), (1239919,), (1239920,), (1239921,), (1239922,), (1239923,), | ||
(1239924,), (1239925,), (1239926,), (1239927,), (1239928,), (1239929,), | ||
(1239930,), (1239931,), (1239932,), (1239933,), (1239934,), (1239935,), | ||
(1239936,), (1239937,), (1239938,), (1239939,), (1239940,), (1239941,), | ||
(1239942,), (1239943,), (1239944,), (1239945,), (1239946,), (1239947,), | ||
(1239948,), (1239949,), (1239950,), (1239951,), (1239952,), (1239953,), | ||
(1239954,), (1239955,), (1239956,), (1239957,), (1239958,), (1239959,), | ||
(1239960,), (1239961,), (1239962,), (1239963,), (1239964,), (1239965,), | ||
(1239966,), (1239967,), (1239968,), (1239969,), (1239970,), (1239971,), | ||
(1239972,), (1239973,), (1239974,), (1239975,), (1239976,), (1239977,), | ||
(1239978,), (1239979,), (1239980,), (1239981,), (1239982,), (1239983,), | ||
(1239984,), (1239985,), (1239986,), (1239987,), (1239988,), (1239989,), | ||
(1239990,), (1239991,), (1239992,), (1239993,), (1239994,), (1239995,), | ||
(1239996,), (1239997,), (1239998,), (1239999,)])) | ||
|
||
|
||
def test_idr_fe0f141905(): | ||
res = idr_query(""" | ||
select non_commercial, | ||
eligible_owner_occupier, | ||
min(price) min_price, | ||
max(price) max_price | ||
from ACT_Conveyance_Duty | ||
where duty = 140740 | ||
group by non_commercial, | ||
eligible_owner_occupier; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('non_commercial', 'eligible_owner_occupier', 'min_price', 'max_price'), | ||
[(False, False, 2814701, 2814800), (True, False, 3099901, 3100000), | ||
(True, True, 3099901, 3100000)])) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from jetisu.idr_query import idr_query, idr_test_res_sort | ||
|
||
def test_idr_60cade641e(): | ||
res = idr_query("""select * from australian_gst where price = 110; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('price', 'ex_gst_amount', 'gst_amount'), [(110.0, 100.0, 10.0)])) | ||
|
||
|
||
def test_idr_c46f0fe5f7(): | ||
res = idr_query("""select * from Australian_GST where price=100 and ex_gst_amount=1 and gst_amount=1; | ||
""", 'data') | ||
assert idr_test_res_sort(res) == idr_test_res_sort((('price', 'ex_gst_amount', 'gst_amount'), [])) | ||
|
Oops, something went wrong.