File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1509,6 +1509,15 @@ def test_eq_with_non_table_returns_false(
15091509
15101510 assert result is False
15111511
1512+ def test_eq_returns_not_implemented_for_non_table (
1513+ self , make_table : "Callable[..., Table]"
1514+ ) -> None :
1515+ table = make_table ()
1516+
1517+ result = table .__eq__ ("string" )
1518+
1519+ assert result is NotImplemented
1520+
15121521 def test_equal_relative_vs_absolute_path (
15131522 self , tmp_path : "Path" , monkeypatch : "pytest.MonkeyPatch"
15141523 ) -> None :
Original file line number Diff line number Diff line change @@ -1393,6 +1393,18 @@ def test_eq_with_non_transaction_returns_false(
13931393 finally :
13941394 tx .abort ()
13951395
1396+ def test_eq_returns_not_implemented_for_non_transaction (
1397+ self , make_table : "Callable[..., Table]"
1398+ ) -> None :
1399+ table = make_table ()
1400+
1401+ tx = table .transaction ()
1402+ try :
1403+ result = tx .__eq__ ("string" )
1404+ assert result is NotImplemented
1405+ finally :
1406+ tx .abort ()
1407+
13961408 def test_finalized_vs_active_not_equal (self , tmp_path : "Path" ) -> None :
13971409 path1 = tmp_path / "test1.jsonlt"
13981410 path2 = tmp_path / "test2.jsonlt"
You can’t perform that action at this time.
0 commit comments