| 883 | is_(p1 != p5, True) |
| 884 | |
| 885 | def test_eq_non_path(self): |
| 886 | umapper = inspect(self.classes.User) |
| 887 | amapper = inspect(self.classes.Address) |
| 888 | u_alias = inspect(aliased(self.classes.User)) |
| 889 | p1 = PathRegistry.coerce((umapper,)) |
| 890 | p2 = PathRegistry.coerce((umapper, umapper.attrs.addresses)) |
| 891 | p3 = PathRegistry.coerce((u_alias, umapper.attrs.addresses)) |
| 892 | p4 = PathRegistry.coerce((u_alias, umapper.attrs.addresses, amapper)) |
| 893 | p5 = PathRegistry.coerce((u_alias,)).token("relationship:*") |
| 894 | |
| 895 | non_object = 54.1432 |
| 896 | |
| 897 | for obj in [p1, p2, p3, p4, p5]: |
| 898 | with expect_warnings( |
| 899 | "Comparison of PathRegistry to " |
| 900 | "<.* 'float'> is not supported" |
| 901 | ): |
| 902 | is_(obj == non_object, False) |
| 903 | |
| 904 | with expect_warnings( |
| 905 | "Comparison of PathRegistry to " |
| 906 | "<.* 'float'> is not supported" |
| 907 | ): |
| 908 | is_(obj != non_object, True) |
| 909 | |
| 910 | def test_contains_mapper(self): |
| 911 | umapper = inspect(self.classes.User) |