Skip to content

Commit c8f1a70

Browse files
committed
TST: Mark more xfails
1 parent 99ee55f commit c8f1a70

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

dataframe_sql/tests/markers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
raises=(OperationNotDefinedError, NotImplementedError),
66
reason="Not implemented in ibis",
77
)
8+
9+
ibis_next_bug_fix = pytest.mark.xfail(reason="Bug fixed in next ibis release")

dataframe_sql/tests/pandas_sql_functionality_test.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
register_env_tables,
2121
remove_env_tables,
2222
)
23-
from dataframe_sql.tests.markers import ibis_not_implemented
23+
from dataframe_sql.tests.markers import ibis_not_implemented, ibis_next_bug_fix
2424

2525

2626
@pytest.fixture(autouse=True, scope="module")
@@ -445,6 +445,10 @@ def test_select_star_from_multiple_tables():
445445
tm.assert_frame_equal(pandas_frame, my_frame)
446446

447447

448+
@pytest.mark.xfail(
449+
raises=AssertionError,
450+
reason="Bug originating from ibis when " "performing cross join on same table",
451+
)
448452
def test_select_columns_from_two_tables_with_same_column_name():
449453
"""
450454
Test selecting tables
@@ -453,7 +457,9 @@ def test_select_columns_from_two_tables_with_same_column_name():
453457
my_frame = query("""select * from forest_fires table1, forest_fires table2""")
454458
table1 = FOREST_FIRES.copy()
455459
table2 = FOREST_FIRES.copy()
456-
pandas_frame = merge(table1.assign(__=1), table2.assign(__=1), on="__", how="inner")
460+
pandas_frame = merge(
461+
table1.assign(__=1), table2.assign(__=1), on="__", how="inner", copy=False
462+
)
457463
del pandas_frame["__"]
458464

459465
renamed = {}
@@ -464,10 +470,10 @@ def test_select_columns_from_two_tables_with_same_column_name():
464470
renamed[column] = "table2." + column.replace("_y", "")
465471
pandas_frame.rename(columns=renamed, inplace=True)
466472

467-
tm.assert_frame_equal(
468-
pandas_frame.sort_values(by=list(pandas_frame.columns), kind="mergesort"),
469-
my_frame.sort_values(by=list(my_frame.columns), kind="mergesort"),
470-
)
473+
for column in my_frame.columns:
474+
tm.assert_series_equal(pandas_frame[column], my_frame[column])
475+
476+
tm.assert_frame_equal(my_frame, pandas_frame)
471477

472478

473479
def test_maintain_case_in_query():
@@ -989,7 +995,7 @@ def test_timestamps():
989995
pandas_frame = FOREST_FIRES.copy()[["wind"]]
990996
pandas_frame["now()"] = datetime.now()
991997
pandas_frame["today()"] = date.today()
992-
pandas_frame["_literal5"] = datetime(2019, 1, 31, 23, 20, 32)
998+
pandas_frame["_literal2"] = datetime(2019, 1, 31, 23, 20, 32)
993999
tm.assert_frame_equal(pandas_frame, my_frame)
9941000

9951001

@@ -1036,6 +1042,7 @@ def test_multiple_aliases_same_column():
10361042
tm.assert_frame_equal(pandas_frame, my_frame)
10371043

10381044

1045+
@ibis_next_bug_fix
10391046
def test_sql_data_types():
10401047
"""
10411048
Tests sql data types
@@ -1142,4 +1149,3 @@ def test_boolean_order_of_operations_with_parens():
11421149
].reset_index(drop=True)
11431150

11441151
tm.assert_frame_equal(pandas_frame, my_frame)
1145-

0 commit comments

Comments
 (0)