diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-01-01 02:53:12 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-01-01 02:53:12 +0200 |
commit | 36940fc907cc552e13c6d5d35ae3b23d859840ac (patch) | |
tree | c9af2ca9b92ae224bae09798fb572631150ec82c /summainlib_tests.py | |
parent | 34b139012bc2f6d0dbadc9a43f492d66610d3200 (diff) | |
download | summain-36940fc907cc552e13c6d5d35ae3b23d859840ac.tar.gz |
Implement st_dev formatting. Add unit test.
Diffstat (limited to 'summainlib_tests.py')
-rw-r--r-- | summainlib_tests.py | 6 |
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') + |