def test_querylayer_size_column_key(self): """layer.QueryLayer size dict has to have a column key""" # size dict must have a 'column' key with self.assertRaises(ValueError, msg='size dict must have a `column` key'): QueryLayer(self.query, size={'scheme': styling.temps(10)})
def setUp(self): # color schemes with all different names self.burg = styling.burg(bins=4) self.burgYl = styling.burgYl(bins=4) self.redOr = styling.redOr(bins=4) self.orYel = styling.orYel(bins=4) self.peach = styling.peach(bins=4) self.pinkYl = styling.pinkYl(bins=4) self.mint = styling.mint(bins=4) self.bluGrn = styling.bluGrn(bins=4) self.darkMint = styling.darkMint(bins=4) self.emrld = styling.emrld(bins=4) self.bluYl = styling.bluYl(bins=4) self.teal = styling.teal(bins=4) self.tealGrn = styling.tealGrn(bins=4) self.purp = styling.purp(bins=4) self.purpOr = styling.purpOr(bins=4) self.sunset = styling.sunset(bins=4) self.magenta = styling.magenta(bins=4) self.sunsetDark = styling.sunsetDark(bins=4) self.brwnYl = styling.brwnYl(bins=4) self.armyRose = styling.armyRose(bins=4) self.fall = styling.fall(bins=4) self.geyser = styling.geyser(bins=4) self.temps = styling.temps(bins=4) self.tealRose = styling.tealRose(bins=4) self.tropic = styling.tropic(bins=4) self.earth = styling.earth(bins=4) self.antique = styling.antique(bins=4) self.bold = styling.bold(bins=4) self.pastel = styling.pastel(bins=4) self.prism = styling.prism(bins=4) self.safe = styling.safe(bins=4) self.vivid = styling.vivid(bins=4)
def test_querylayer_size_and_time(self): """layer.QueryLayer size and time cannot be used together""" # size and time cannot be specified at the same time if size is # styled by value with self.assertRaises(ValueError, msg='time key should not be present'): QueryLayer(self.query, size={'column': 'mag', 'scheme': styling.temps(10)}, time='date_col')