Ejemplo n.º 1
0
 def test_filter_and(self):
     coll = self.coll
     df = self.df
     y = int(df.y.unique()[0])
     result = Filter(coll, x=0, y=y).value
     testdf = df[(df.x == 0) & (df.y == y)]
     self.assertTrue(result.equals(testdf))
Ejemplo n.º 2
0
 def test_filter_or(self):
     coll = self.coll
     df = self.df
     result = Filter(coll, x=0, y__gt=5).value
     testdf = df[(df.x == 0) & (df.y > 5)]
     self.assertTrue(result.equals(testdf))
Ejemplo n.º 3
0
 def test_filter_in(self):
     coll = self.coll
     df = self.df
     result = Filter(coll, x__in=[1, 2, 3]).value
     testdf = df[df.x.isin([1, 2, 3])]
     self.assertTrue(result.equals(testdf))
Ejemplo n.º 4
0
 def test_filter(self):
     coll = self.coll
     df = self.df
     result = Filter(coll, x=0).value
     testdf = df[df.x == 0]
     self.assertTrue(result.equals(testdf))