Browse Source

Minor cleanups

Remove nilmdb.layout.filltable


git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10662 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/bxinterval-last
Jim Paris 11 years ago
parent
commit
8c619cfde5
3 changed files with 3 additions and 11 deletions
  1. +0
    -9
      nilmdb/layout.py
  2. +1
    -1
      setup.cfg
  3. +2
    -1
      tests/test_nilmdb.py

+ 0
- 9
nilmdb/layout.py View File

@@ -130,12 +130,3 @@ class Parser(object):
if len(self.data) and self.ts_field is not None:
self.min_timestamp = self.data[0][self.ts_field]
self.max_timestamp = self.data[-1][self.ts_field]

def fill_table(self, table):
"""Fill a PyTables table object with the parsed data.
The table's rows must match the parser's layout"""
row = table.row
for data in self.data:
for (n, (name, type)) in enumerate(self.layout.fields):
row[name] = data[n]
row.append()

+ 1
- 1
setup.cfg View File

@@ -5,7 +5,7 @@ nologcapture= # comment to see cherrypy logs on failure
with-coverage=
cover-inclusive=
cover-package=nilmdb
#cover-erase=
cover-erase=
##cover-html= # this works, puts html output in cover/ dir
##cover-branches= # need nose 1.1.3 for this
stop=


+ 2
- 1
tests/test_nilmdb.py View File

@@ -40,8 +40,9 @@ class Test00Nilmdb(object): # named 00 so it runs first
old = sys.stdout
sys.stdout = capture
with nilmdb.Timer("test"):
nilmdb.timer.time.sleep(0.1)
nilmdb.timer.time.sleep(0.01)
sys.stdout = old
in_("test: ", capture.getvalue())

def test_stream(self):
db = nilmdb.NilmDB(testdb, sync=False)


Loading…
Cancel
Save