diff --git a/tests/test_maps.py b/tests/test_maps.py index de9b8e63f..104e0e5e9 100644 --- a/tests/test_maps.py +++ b/tests/test_maps.py @@ -44,6 +44,7 @@ def test_setup_map(): 'width': 960, 'height': 500, 'features': [], + 'attr':'Map tiles by Stamen Design, CC BY 3.0 - Map data © OpenStreetMap' } """ Tests features as NumPy array. """ kwargs2 = { @@ -56,6 +57,7 @@ def test_setup_map(): ds.Marker(51.514, -0.139), ds.Marker(51.519, -0.132) ]), + 'attr':'Map tiles by Stamen Design, CC BY 3.0 - Map data © OpenStreetMap' } ds.Map(**kwargs1).show() ds.Map(**kwargs2).show() diff --git a/tests/test_tables.py b/tests/test_tables.py index b68f8f404..d090bb8c0 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -103,6 +103,11 @@ def scrabble_table2(): 'pointsplus1', [2, 3, 3, 11], ]) +@pytest.fixture(scope='function') +def empty_table(): + """Setup empty table""" + return Table().with_columns("A",[]) + def assert_equal(string1, string2): string1, string2 = str(string1), str(string2) @@ -1660,6 +1665,21 @@ def test_join_without_other_label(table, table2): 2 | c | 3 | two """) +def test_join_with_empty_table(table, empty_table): + result = empty_table._join('points', table) + assert result is None + + result = table._join('points', empty_table) + assert result is None + +def test_join_without_other_label(table, table2): + result = table._join('points', table2) + assert result is not None + + + + + ################## # Export/Display #