Ejemplo n.º 1
0
 def test_multiple_selections(self):
     """Test multiple selections applied to dataset."""
     dataset = apply_selection(["cast.lon=100", "cast.lat>0"], self.dataset)
     np.testing.assert_array_equal(
         dataset.cast.data,
         self.dataset.cast.data[self.dataset.cast.data["lon"] == 100][
             self.dataset.cast.data["lat"] > 0])
Ejemplo n.º 2
0
 def test_multiple_selections(self):
     """Test multiple selections applied to dataset."""
     dataset = apply_selection(
         ["cast.lon=100", "cast.lat>0"], self.dataset)
     np.testing.assert_array_equal(
         dataset.cast.data,
         self.dataset.cast.data[
             self.dataset.cast.data["lon"] == 100
         ][
             self.dataset.cast.data["lat"] > 0
         ])
Ejemplo n.º 3
0
 def test_simple_selection(self):
     """Test a simple selection applied to the dataset."""
     dataset = apply_selection(["cast.lon=100"], self.dataset)
     np.testing.assert_array_equal(
         dataset.cast.data,
         self.dataset.cast.data[self.dataset.cast.data["lon"] == 100])
Ejemplo n.º 4
0
 def test_no_selection(self):
     """Test no selection in the query string."""
     dataset = apply_selection("", self.dataset)
     np.testing.assert_array_equal(dataset.cast.data,
                                   self.dataset.cast.data)
Ejemplo n.º 5
0
 def test_simple_selection(self):
     """Test a simple selection applied to the dataset."""
     dataset = apply_selection(["cast.lon=100"], self.dataset)
     np.testing.assert_array_equal(
         dataset.cast.data,
         self.dataset.cast.data[self.dataset.cast.data["lon"] == 100])
Ejemplo n.º 6
0
 def test_no_selection(self):
     """Test no selection in the query string."""
     dataset = apply_selection("", self.dataset)
     np.testing.assert_array_equal(
         dataset.cast.data, self.dataset.cast.data)