Skip to content

Commit

Permalink
add test for no supp file 1990
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed Jun 14, 2020
1 parent d3ee8c1 commit 9fb1bf7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nhgisxwalk/tests/test_nhgisxwalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,23 @@ def test_xwalk_state_bgp1990_trt2010(self,):
numpy.testing.assert_equal(knw_str_vals, obs_str_vals)
numpy.testing.assert_allclose(knw_num_vals, obs_num_vals, atol=6)

def test_xwalk_bgp1990_trt2010_no_supp_error(self):
with self.assertRaises(RuntimeError):
obs_xwalk = nhgisxwalk.GeoCrossWalk(
base_xwalk_blk1990_blk2010,
source_year=_90,
target_year=_10,
source_geo=bgp,
target_geo=trt,
base_source_table=tab_data_path_1990,
supp_source_table=None,
input_var=input_vars_1990,
weight_var=input_var_tags,
stfips=stfips,
vectorized=False,
keep_base=False,
)

def test_xwalk_extract_state_bgp1990_trt2010(self):
known_target_nan_xwalk = numpy.empty((0, 7))
known_source_nan_xwalk = numpy.array(
Expand Down

0 comments on commit 9fb1bf7

Please sign in to comment.