diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-01-01 02:54:20 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-01-01 02:54:20 +0200 |
commit | 5c8f4e685a147cf7fe33b97c70673928d1485db5 (patch) | |
tree | 822466726b680e13a00e276b219772759f4067c9 /summainlib_tests.py | |
parent | 36940fc907cc552e13c6d5d35ae3b23d859840ac (diff) | |
download | summain-5c8f4e685a147cf7fe33b97c70673928d1485db5.tar.gz |
Implement st_nlink formatting. With 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 c3bcf4b..b9849d2 100644 --- a/summainlib_tests.py +++ b/summainlib_tests.py @@ -33,7 +33,8 @@ class FilesystemObjectTests(unittest.TestCase): self.st = FakeStatResult(st_mtime=1262307723, st_mode=stat.S_IFREG | 0644, st_ino=12765, - st_dev=42) + st_dev=42, + st_nlink=2) def new(self, name): return summainlib.FilesystemObject(name, stat_result=self.st) @@ -57,3 +58,6 @@ class FilesystemObjectTests(unittest.TestCase): def test_formats_device_number_correctly(self): self.assertEqual(self.new('foo')['Dev'], '42') + def test_formats_link_count_correctly(self): + self.assertEqual(self.new('foo')['Nlink'], '2') + |