summaryrefslogtreecommitdiff
path: root/summainlib_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-01-01 02:53:12 +0200
committerLars Wirzenius <liw@liw.fi>2010-01-01 02:53:12 +0200
commit36940fc907cc552e13c6d5d35ae3b23d859840ac (patch)
treec9af2ca9b92ae224bae09798fb572631150ec82c /summainlib_tests.py
parent34b139012bc2f6d0dbadc9a43f492d66610d3200 (diff)
downloadsummain-36940fc907cc552e13c6d5d35ae3b23d859840ac.tar.gz
Implement st_dev formatting. Add unit test.
Diffstat (limited to 'summainlib_tests.py')
-rw-r--r--summainlib_tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/summainlib_tests.py b/summainlib_tests.py
index 4a816e7..c3bcf4b 100644
--- a/summainlib_tests.py
+++ b/summainlib_tests.py
@@ -32,7 +32,8 @@ class FilesystemObjectTests(unittest.TestCase):
def setUp(self):
self.st = FakeStatResult(st_mtime=1262307723,
st_mode=stat.S_IFREG | 0644,
- st_ino=12765)
+ st_ino=12765,
+ st_dev=42)
def new(self, name):
return summainlib.FilesystemObject(name, stat_result=self.st)
@@ -53,3 +54,6 @@ class FilesystemObjectTests(unittest.TestCase):
def test_formats_inode_number_correctly(self):
self.assertEqual(self.new('foo')['Ino'], '12765')
+ def test_formats_device_number_correctly(self):
+ self.assertEqual(self.new('foo')['Dev'], '42')
+