def test_year_str(self): with self.assertRaises(TypeError): get_form_860(data_dir, year="2016")
def test_good_year(self): form_860 = get_form_860(data_dir) self.assertIsInstance(form_860, pd.DataFrame)
def test_bad_year(self): with self.assertRaises(ValueError): get_form_860(data_dir, year=3000)
def test_bad_dir(self): bad_dir = path.abspath(path.join(path.dirname(__file__), "..", "foo")) with self.assertRaises(ValueError): get_form_860(bad_dir)