From 464990bd963756c23503b3ee803c1cb4db8581a3 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Thu, 16 May 2024 22:08:22 +0200 Subject: [PATCH] fix: failing test --- .../gen_input.py | 100 ++---------------- .../gen_input.py.map | 2 +- .../expressions/member access/input.sdsdev | 8 -- 3 files changed, 10 insertions(+), 100 deletions(-) diff --git a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py index 56f5a321f..3f9419eb2 100644 --- a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py @@ -197,7 +197,7 @@ def test(): "safeds.data.tabular.containers.Table.from_csv_file", Table.from_csv_file, [safeds_runner.absolute_path('abc.csv')], - {}, + {"separator": ','}, [safeds_runner.file_mtime('abc.csv')] ) safeds_runner.save_placeholder('a', __gen_a) @@ -205,7 +205,7 @@ def test(): "safeds.data.tabular.containers.Table.from_csv_file", Table.from_csv_file, [safeds_runner.absolute_path('abc.csv')], - {}, + {"separator": ','}, [safeds_runner.file_mtime('abc.csv')] ) __gen_a2 = safeds_runner.memoized_dynamic_call( @@ -225,88 +225,6 @@ def test(): [] ) safeds_runner.save_placeholder('v', __gen_v) - __gen_receiver_12 = __gen_v - __gen_d = safeds_runner.memoized_dynamic_call( - __gen_receiver_12, - "plot_histogram", - [], - {"number_of_bins": 10}, - [] - ) - safeds_runner.save_placeholder('d', __gen_d) - __gen_receiver_13 = __gen_a - __gen_receiver_14 = safeds_runner.memoized_dynamic_call( - __gen_receiver_13, - "get_column", - ['b'], - {}, - [] - ) - __gen_p = safeds_runner.memoized_dynamic_call( - __gen_receiver_14, - "plot_histogram", - [], - {"number_of_bins": 10}, - [] - ) - safeds_runner.save_placeholder('p', __gen_p) - __gen_receiver_15 = __gen_a - __gen_receiver_16 = safeds_runner.memoized_dynamic_call( - __gen_receiver_15, - "get_column", - ['b'], - {}, - [] - ) - __gen_receiver_17 = safeds_runner.memoized_dynamic_call( - __gen_receiver_16, - "plot_histogram", - [], - {"number_of_bins": 10}, - [] - ) - __gen_r = safeds_runner.memoized_dynamic_call( - __gen_receiver_17, - "flip_vertically", - [], - {}, - [] - ) - safeds_runner.save_placeholder('r', __gen_r) - __gen_receiver_18 = __gen_a - __gen_receiver_19 = safeds_runner.memoized_dynamic_call( - __gen_receiver_18, - "get_column", - ['b'], - {}, - [] - ) - __gen_receiver_20 = safeds_runner.memoized_dynamic_call( - __gen_receiver_19, - "plot_histogram", - [], - {"number_of_bins": 10}, - [] - ) - __gen_receiver_21 = safeds_runner.memoized_dynamic_call( - __gen_receiver_20, - "flip_vertically", - [], - {}, - [] - ) - __gen_q = safeds_runner.memoized_dynamic_call( - __gen_receiver_21, - "adjust_contrast", - [1.2], - {}, - [] - ) - safeds_runner.save_placeholder('q', __gen_q) - f(__gen_d) - f(__gen_p) - f(__gen_r) - f(__gen_q) f(safeds_runner.memoized_static_call( "tests.generator.memberAccessWithRunnerIntegration.Outer.Nested.f", Outer.Nested.f, @@ -322,9 +240,9 @@ def test(): [] ) safeds_runner.save_placeholder('nestedInstance', __gen_nestedInstance) - __gen_receiver_22 = __gen_nestedInstance + __gen_receiver_12 = __gen_nestedInstance __gen_nestedResult = safeds_runner.memoized_dynamic_call( - __gen_receiver_22, + __gen_receiver_12, "g", [], {}, @@ -332,24 +250,24 @@ def test(): ) safeds_runner.save_placeholder('nestedResult', __gen_nestedResult) f(__gen_nestedResult) - __gen_receiver_23 = safeds_runner.memoized_static_call( + __gen_receiver_13 = safeds_runner.memoized_static_call( "safeds.data.tabular.transformation.OneHotEncoder", OneHotEncoder, [], - {}, + {"separator": '__'}, [] ) __gen_encoder = safeds_runner.memoized_dynamic_call( - __gen_receiver_23, + __gen_receiver_13, "fit", [__gen_a, ['b']], {}, [] ) safeds_runner.save_placeholder('encoder', __gen_encoder) - __gen_receiver_24 = __gen_encoder + __gen_receiver_14 = __gen_encoder __gen_transformedTable = safeds_runner.memoized_dynamic_call( - __gen_receiver_24, + __gen_receiver_14, "transform", [__gen_a], {}, diff --git a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map index 90244b709..83900c46f 100644 --- a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdsdev"],"names":["test","f","g","h","result1","result2","c","a","b","factory","c1","v","d","p","r","q","factorynested","nestedinstance","nestedresult","onehotencoder","encoder"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;AAwDA,IAASA,IAAI;IACTC,CAAC,CAAC;;QAAAC,CAAC;;;;;IACHD,CAAC,CAAC;;QAAAE,CAAC;;;;MAAGC,CAAO;IACbH,CAAC,CAAC;;QAAAE,CAAC;;;;MAAGE,CAAO;IACbJ,CAAC,CAAC;;QAAAK,CAAC;;;;MAAGC,CAAC;IACPN,CAAC,CAAC;;QAAAK,CAAC;;;;MAAGE,CAAC;IACPP,CAAC,CAAU,6BAAC,CAAV;;QAAAQ,OAAO;;;;QAAIF,CAAC;IACdN,CAAC,CAAU,6BAAC,CAAV;;QAAAQ,OAAO;;;;QAAID,CAAC;IACZ,mBAAA;;QAAAF,CAAC;;;;;IAAHL,CAAC,CAAC,CAAA,CAAM,CAAC;IACT,WAAS;;QAAAK,CAAC;;;;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AC,GAAG;;;;IAAe,oBAAA;;;;2BA+dgB;;;IA/dC,oBAAA;;;;;;;IAAvD,UAAQ;;;SAAiE,GAAG;;;;IAA5E;IACAN,CAAC,CAACW,OAAC;IACHX,CAAC,CAACY,OAAC;IACHZ,CAAC,CAACa,OAAC;IACHb,CAAC,CAACc,OAAC;IACHd,CAAC,CAAC;;;;;;;IACF,uBAAqB;;QAAAe,aAAa;;;;;IAAlC;IACmBC,oBAAAA,oBAAc;IAAjC,qBAAmB;;;;;;;IAAnB;IACAhB,CAAC,CAACiB,kBAAY;IACA,oBAAA;;QAAAC,aAAa;;;;;IAA3B,gBAAc;;;SAAoBZ,OAAC,EAAE,CAAC,GAAG;;;;IAAzC;IACuBa,oBAAAA,aAAO;IAA9B,yBAAuB;;;SAAkBb,OAAC;;;;IAA1C","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdsdev"],"names":["test","f","g","h","result1","result2","c","a","b","factory","c1","factorynested","nestedinstance","nestedresult","onehotencoder","encoder"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;AAwDA,IAASA,IAAI;IACTC,CAAC,CAAC;;QAAAC,CAAC;;;;;IACHD,CAAC,CAAC;;QAAAE,CAAC;;;;MAAGC,CAAO;IACbH,CAAC,CAAC;;QAAAE,CAAC;;;;MAAGE,CAAO;IACbJ,CAAC,CAAC;;QAAAK,CAAC;;;;MAAGC,CAAC;IACPN,CAAC,CAAC;;QAAAK,CAAC;;;;MAAGE,CAAC;IACPP,CAAC,CAAU,6BAAC,CAAV;;QAAAQ,OAAO;;;;QAAIF,CAAC;IACdN,CAAC,CAAU,6BAAC,CAAV;;QAAAQ,OAAO;;;;QAAID,CAAC;IACZ,mBAAA;;QAAAF,CAAC;;;;;IAAHL,CAAC,CAAC,CAAA,CAAM,CAAC;IACT,WAAS;;QAAAK,CAAC;;;;;IAAV;IACEI,mBAAAA,QAAE;IAAJT,CAAC,CAAC,CAAA,CAAK,CAAC;IACN,mBAAA;;QAAAK,CAAC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ang/tests/resources/generation/python/runner integration/expressions/member access/input.sdsdev b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/input.sdsdev index d983432e5..6c33f4db8 100644 --- a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/input.sdsdev +++ b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/member access/input.sdsdev @@ -78,14 +78,6 @@ pipeline test { val a = Table.fromCsvFile("abc.csv"); val a2 = Table.fromCsvFile("abc.csv").removeColumns(["u"]); val v = a.getColumn("b"); - val d = v.plotHistogram(); - val p = a.getColumn("b").plotHistogram(); - val r = a.getColumn("b").plotHistogram().flipVertically(); - val q = a.getColumn("b").plotHistogram().flipVertically().adjustContrast(1.2); - f(d); - f(p); - f(r); - f(q); f(Outer.Nested.f()); val nestedInstance = factoryNested(); val nestedResult = nestedInstance.g();