示例#1
0
 def testDispDFrameByDate(self):
     '''******Test that we can do a return of the DF and it's HTML by date'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispDFrameByDate('2016-01-01 00:00:00',
                                           '2016-02-02 00:00:00', df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
示例#2
0
 def testUpdateCat(self):
     '''******Test that we can update a cat'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispOFX(df)
     self.assertTrue(
         finaUpdt.updateCat('toe', 'jamb', None, odf, "tests/assets",
                            "test.pkl"))
示例#3
0
 def testUnPickleData(self):
     '''******Test both options for unpickling the dataframe'''
     self.assertIsInstance(finaExp.unPickleData("test.pkl", "tests/assets"),
                           pandas.core.frame.DataFrame)
     self.assertIsInstance(finaExp.unPickleData("toejamb", "tests/assets"),
                           pandas.core.frame.DataFrame)
示例#4
0
 def testDispMonthPareto(self):
   '''******Test that we can spit out a buffered chart for a month pareto'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   buf = finaDisp.dispMonthPareto(df, 'b')
   self.assertIsInstance(buf, cStringIO.OutputType)
示例#5
0
 def testDispDFrameByCat(self):
   '''******Test that we can do a return of the DF and it's HTML by cat'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispDFrameByCat('hoser' , df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
示例#6
0
 def testDispDFrameByDate(self):
   '''******Test that we can do a return of the DF and it's HTML by date'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispDFrameByDate('2016-01-01 00:00:00', '2016-02-02 00:00:00', df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
示例#7
0
 def testDispOFX(self):
   '''******Test that we can do the basic return of a DF and it's HTML'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispOFX(df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
示例#8
0
 def testPickleDataFrame(self):
     '''******Test that we can pickle a data frame successfully.'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     finaImp.pickleDataFrame(df, "this.pkl", "tests/assets")
     self.assertTrue(os.path.isfile("tests/assets/this.pkl"))
     os.remove("tests/assets/this.pkl")
示例#9
0
 def testDispMonthPareto(self):
     '''******Test that we can spit out a buffered chart for a month pareto'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     buf = finaDisp.dispMonthPareto(df, 'b')
     self.assertIsInstance(buf, cStringIO.OutputType)
示例#10
0
 def testDispDFrameByCat(self):
     '''******Test that we can do a return of the DF and it's HTML by cat'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispDFrameByCat('hoser', df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
示例#11
0
 def testDispOFX(self):
     '''******Test that we can do the basic return of a DF and it's HTML'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispOFX(df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
示例#12
0
 def testUpdateCat(self):
   '''******Test that we can update a cat'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispOFX(df)
   self.assertTrue(finaUpdt.updateCat('toe', 'jamb', None,  odf, "tests/assets", "test.pkl"))
示例#13
0
 def testPickleDataFrame(self):
   '''******Test that we can pickle a data frame successfully.'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   finaImp.pickleDataFrame(df, "this.pkl", "tests/assets")
   self.assertTrue(os.path.isfile("tests/assets/this.pkl"))
   os.remove("tests/assets/this.pkl")