From 132371f2f35b0c066cb153e72353c2c1cbd832f0 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 7 Nov 2026 16:09:01 +0900 Subject: [PATCH] test(est): cover Korean quantity labels --- resources/tester/test_est_native_export.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/tester/test_est_native_export.py b/resources/tester/test_est_native_export.py index e26cd6670..833bc728e 100644 --- a/resources/tester/test_est_native_export.py +++ b/resources/tester/test_est_native_export.py @@ -96,13 +96,13 @@ def test_estx_quantity_item_labels_round_trip_when_sample_exists(): pytest.skip("installed EST sample unavailable") script = """const fs=require('fs'),m=require('./tools/est-test/import-estx.cjs'),e=require('./tools/est-test/export-estx.cjs'); const p=m.importEstx(fs.readFileSync(process.argv[1])),before=structuredClone(p.quantitySheets),sheet=p.quantitySheets[0]; - sheet.items[0].Name='changed name';sheet.items[0].Size='changed size'; - const mismatch=p.quantitySheets.find(s=>s.Code==='N0000000083');mismatch.items[4].Name='preserved mismatch'; + sheet.items[0].Name='수정된 품명';sheet.items[0].Size='수정 규격'; + const mismatch=p.quantitySheets.find(s=>s.Code==='N0000000083');mismatch.items[4].Name='수량 보존'; const q=m.importEstx(e.exportEstx(p)),item=q.quantitySheets[0].items[0]; const restored=q.quantitySheets.find(s=>s.Code==='N0000000083'); const other=JSON.stringify(q.quantitySheets[0].items.slice(1))===JSON.stringify(before[0].items.slice(1)); const rest=JSON.stringify(q.quantitySheets.filter(s=>s.Code!==sheet.Code && s.Code!==mismatch.Code))===JSON.stringify(before.filter(s=>s.Code!==sheet.Code && s.Code!==mismatch.Code)); - const preserved=restored.items[4].Name==='preserved mismatch' && restored.items[4].GN===286 && JSON.stringify(restored.rows)===JSON.stringify(before.find(s=>s.Code===mismatch.Code).rows); + const preserved=restored.items[4].Name==='수량 보존' && restored.items[4].GN===286 && JSON.stringify(restored.rows)===JSON.stringify(before.find(s=>s.Code===mismatch.Code).rows); p.quantitySheets[0].items[0].TargetCode='new target';let rejected=false;try{e.exportEstx(p)}catch{rejected=true} console.log(JSON.stringify({name:item.Name,size:item.Size,other,rest,preserved,rejected}));""" result = json.loads( @@ -111,8 +111,8 @@ def test_estx_quantity_item_labels_round_trip_when_sample_exists(): ) ) assert result == { - "name": "changed name", - "size": "changed size", + "name": "수정된 품명", + "size": "수정 규격", "other": True, "rest": True, "preserved": True,