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)
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"))
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)
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)
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)
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)
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)
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")
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)
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)
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)
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"))
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")