Example #1
0
 def test_dbf2df(self):
     fLOG(__file__,
          self._testMethodName,
          OutputPrint=__name__ == "__main__",
          LogFile="temp_hal_log2.txt")
     fold = os.path.abspath(os.path.split(__file__)[0])
     file = os.path.join(fold, "data", "varmod_naissances.dbf")
     df = dBase2df(file)
     assert df is not None
Example #2
0
 def test_dbf2df(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__",
         LogFile="temp_hal_log2.txt")
     fold = os.path.abspath(os.path.split(__file__)[0])
     file = os.path.join(fold, "data", "varmod_naissances.dbf")
     df = dBase2df(file)
     assert df is not None
Example #3
0
 def test_dbf2sqlite(self):
     fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__", LogFile = "temp_hal_log2.txt")
     fold = os.path.abspath(os.path.split(__file__)[0])
     file = os.path.join(fold, "data", "varmod_naissances.dbf")
     
     outf = os.path.join(fold, "out_dbfsqlite")
     if not os.path.exists(outf) : os.mkdir(outf)
     
     dbfile = os.path.join(outf, "naissance.db3")
     if os.path.exists(dbfile) : os.remove(dbfile)
     
     df = dBase2df(file)
     dBase2sqllite(dbfile, file)
     assert df is not None
     assert os.path.exists(dbfile)
Example #4
0
    def test_dbf2sqlite(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__",
             LogFile="temp_hal_log2.txt")
        fold = os.path.abspath(os.path.split(__file__)[0])
        file = os.path.join(fold, "data", "varmod_naissances.dbf")

        outf = os.path.join(fold, "out_dbfsqlite")
        if not os.path.exists(outf):
            os.mkdir(outf)

        dbfile = os.path.join(outf, "naissance.db3")
        if os.path.exists(dbfile):
            os.remove(dbfile)

        df = dBase2df(file)
        dBase2sqllite(dbfile, file)
        assert df is not None
        assert os.path.exists(dbfile)