MCPcopy Index your code
hub / github.com/pathwaycom/pathway / test_twoclass_method

Function test_twoclass_method

python/pathway/tests/test_transformers.py:829–939  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

827
828
829def test_twoclass_method():
830 (
831 foo_transformer,
832 transformer2,
833 transformer_common,
834 ) = _fixture_twoclass_transformers()
835
836 hypers = T(
837 """
838 | a
839 11 | 1
840 12 | 2
841 """
842 )
843 table = T(
844 """
845 | a | h
846 6 | 1 | 11
847 7 | 2 | 11
848 8 | 3 | 12
849 """
850 ).with_columns(h=hypers.pointer_from(this.h))
851
852 method_table: Table = foo_transformer(hypers, table).table
853
854 assert_table_equality(
855 method_table.select(method_table.b),
856 T(
857 """
858 | b
859 6 | 11
860 7 | 21
861 8 | 32
862 """
863 ),
864 )
865
866 assert_table_equality(
867 method_table.select(b=method_table.b, c=method_table.c(1000)),
868 T(
869 """
870 | b | c
871 6 | 11 | 12000
872 7 | 21 | 23000
873 8 | 32 | 35000
874 """
875 ),
876 )
877
878 hypers2 = T(
879 """
880 | a
881 13 | 3
882 """
883 )
884 table2 = T(
885 """
886 | a | h

Callers

nothing calls this directly

Calls 9

TFunction · 0.90
transformer2Class · 0.85
transformer_commonClass · 0.85
with_columnsMethod · 0.80
foo_transformerClass · 0.70
pointer_fromMethod · 0.45
selectMethod · 0.45
cMethod · 0.45

Tested by

no test coverage detected