示例#1
0
 def test_add_empty_surface_to_full_table(self, input_tables, position):
     rt = opt_rad.RadiometryTable(tables=(input_tables[0]))
     surf = opt_surf.SpectralSurface()
     rt.add_surface(surf, "new_surf", position)
     colname = utils.real_colname("name", rt.table.colnames)
     assert rt.table[colname][position] == "new_surf"
     assert "new_surf" in rt.surfaces
     assert isinstance(rt.surfaces["new_surf"], opt_surf.SpectralSurface)
示例#2
0
 def test_returns_none_if_name_not_in_colname(self):
     assert utils.real_colname("yahoo", ["Bogus"]) is None
示例#3
0
 def test_returns_real_name(self, name, colnames):
     assert utils.real_colname(name, colnames) == colnames[0]