()
| 827 | |
| 828 | |
| 829 | def 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 |
nothing calls this directly
no test coverage detected