Browse Source

misc updates

git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@9679 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/bxinterval-last
Jim Paris 11 years ago
parent
commit
5784468693
5 changed files with 14 additions and 1 deletions
  1. +2
    -0
      Makefile
  2. +1
    -1
      nilmdb/fileinterval.py
  3. +2
    -0
      test/Makefile
  4. +8
    -0
      test/test-struct-pack.py
  5. +1
    -0
      test/test.dat

+ 2
- 0
Makefile View File

@@ -0,0 +1,2 @@
all:
nosetests

+ 1
- 1
nilmdb/fileinterval.py View File

@@ -25,7 +25,7 @@ class FileInterval(Interval):
self.end_offset = end_offset

def __setattr__(self, name, value):
pass

def subset(self, start, end):
"""Return a new Interval that is a subset of this one"""


+ 2
- 0
test/Makefile View File

@@ -0,0 +1,2 @@
all:
python test-struct-pack.py

+ 8
- 0
test/test-struct-pack.py View File

@@ -0,0 +1,8 @@
import struct
import mmap

f = open("test.dat", "rb+")
mm = mmap.mmap(f.fileno(),3)

print len(mm)
print "first 3 bytes: " + mm[0:3];

+ 1
- 0
test/test.dat View File

@@ -0,0 +1 @@


Loading…
Cancel
Save