def test_to_xml_open_close_deprecations(): # Smoke test on deprecated functions da = GiftiDataArray(np.ones((1, )), 'triangle') with clear_and_catch_warnings() as w: warnings.filterwarnings('always', category=DeprecationWarning) assert_true(isinstance(da.to_xml_open(), str)) assert_equal(len(w), 1) with clear_and_catch_warnings() as w: warnings.filterwarnings('once', category=DeprecationWarning) assert_true(isinstance(da.to_xml_close(), str)) assert_equal(len(w), 1)
def test_to_xml_open_close_deprecations(): # Smoke test on deprecated functions da = GiftiDataArray(np.ones((1,)), 'triangle') with clear_and_catch_warnings() as w: warnings.filterwarnings('always', category=DeprecationWarning) assert_true(isinstance(da.to_xml_open(), string_types)) assert_equal(len(w), 1) with clear_and_catch_warnings() as w: warnings.filterwarnings('once', category=DeprecationWarning) assert_true(isinstance(da.to_xml_close(), string_types)) assert_equal(len(w), 1)