Exemplo n.º 1
0
 def test_pyobj_field_access(self):
     t = empty_table(10)
     t2 = t.update(formulas=[
         "SYM = `AAPL-` + (String)pyobj.name", "PRICE = i * 1000"
     ]).where("PRICE > (int)pyobj.price + 100")
     html_output = to_html(t2)
     self.assertIn("AAPL-GOOG", html_output)
     self.assertIn("2000", html_output)
Exemplo n.º 2
0
 def test_column(self):
     t = empty_table(10).view(formulas=["I=ii", "J=(ii * 2)"]).update(
         "K = vectorized_func(I, J)")
     html_output = to_html(t)
     self.assertIn("<td>9</td>", html_output)
Exemplo n.º 3
0
 def test_filter(self):
     t = empty_table(10).view(
         formulas=["I=ii", "J=(ii * 2)"]).where("vectorized_func(I, J)")
     html_output = to_html(t)
     self.assertIn("<td>5</td><td>10</td>", html_output)