def test_run_update_temazepam_records(tmpdir): """Test Sleep Physionet URL handling.""" import pandas as pd fname = op.join(str(tmpdir), "records.csv") _update_sleep_temazepam_records(fname) data = pd.read_csv(fname) pd.testing.assert_frame_equal(data, pd.read_csv(TEMAZEPAM_SLEEP_RECORDS))
def test_run_update_temazepam_records(tmpdir): """Test Sleep Physionet URL handling.""" import pandas as pd fname = op.join(str(tmpdir), "records.csv") _update_sleep_temazepam_records(fname) data = pd.read_csv(fname) if LooseVersion(pd.__version__) < LooseVersion('0.23.0'): expected = pd.read_csv(TEMAZEPAM_SLEEP_RECORDS) assert_array_equal( data[['subject', 'sha_Hypnogram', 'sha_PSG']].values, expected[['subject', 'sha_Hypnogram', 'sha_PSG']].values, ) else: pd.testing.assert_frame_equal( data, pd.read_csv(TEMAZEPAM_SLEEP_RECORDS))
def test_run_update_temazepam_records(tmpdir): """Test Sleep Physionet URL handling.""" import pandas as pd fname = op.join(str(tmpdir), "records.csv") _update_sleep_temazepam_records(fname) data = pd.read_csv(fname) if LooseVersion(pd.__version__) < LooseVersion('0.23.0'): expected = pd.read_csv(TEMAZEPAM_SLEEP_RECORDS) assert_array_equal( data[['subject', 'sha_Hypnogram', 'sha_PSG']].values, expected[['subject', 'sha_Hypnogram', 'sha_PSG']].values, ) else: pd.testing.assert_frame_equal(data, pd.read_csv(TEMAZEPAM_SLEEP_RECORDS))