MCPcopy Index your code
hub / github.com/clips/pattern / test_file

Method test_file

test/test_db.py:878–890  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

876 print "pattern.db.CSV.load()"
877
878 def test_file(self):
879 # Assert CSV file contents.
880 v = self.csv
881 v.save("test.csv", headers=True)
882 v = open("test.csv", "rb").read()
883 v = db.decode_utf8(v.lstrip(codecs.BOM_UTF8))
884 v = v.replace("\r\n", "\n")
885 self.assertEqual(v,
886 u'"name (STRING)","type (STRING)","tail (BOOLEAN)","age (INTEGER)","date (DATE)"\n'
887 u'"Schrödinger","cat","True","3","2009-11-03 00:00:00"\n'
888 u'"Hofstadter","labrador","True","5","2007-08-04 00:00:00"'
889 )
890 os.unlink("test.csv")
891
892#---------------------------------------------------------------------------------------------------
893

Callers

nothing calls this directly

Calls 2

saveMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected