Skip to content

Commit

Permalink
Merge pull request #7 from zertrin/master
Browse files Browse the repository at this point in the history
Add tests corresponding to commit d1ef413 + sort files by name in views
  • Loading branch information
zertrin committed Nov 13, 2013
2 parents 2f8a094 + 439dcdc commit f890293
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rezoirclogs/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ def __getitem__(self, name):

@property
def dirs(self):
for name in self.fs.listdir(self.path):
for name in sorted(self.fs.listdir(self.path)):
path = self.fs.join(self.path, name)
if self.fs.isrealdir(path):
yield self._make_dir(name)

@property
def chans(self):
files = (name for name in self.fs.listdir(self.path)
files = (name for name in sorted(self.fs.listdir(self.path))
if self.fs.isrealfile(self.fs.join(self.path, name)) and name.endswith('.log'))

for chan in set(name.rsplit('.', 2)[0] for name in files):
Expand Down
4 changes: 3 additions & 1 deletion rezoirclogs/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def test_exotic_nicknames(self):
("22:14 <@DaLynX> merci remram", "DaLynX"),
("04:54 <@Zertr1> derns!", "Zertr1"),
("04:54:00 <@Zertr1> derns!", "Zertr1"),
("01:59 < kage> c'est moche les GUI en java", "kage")]
("01:59 < kage> c'est moche les GUI en java", "kage"),
("11:59 <~kage> c'est moche les GUI en java", "kage"),
("01:59 <&kage> c'est moche les GUI en java", "kage")]

for line, nick in lines:
self.assertEqual(self._get_FUT(line).user, nick, line)
Expand Down

0 comments on commit f890293

Please sign in to comment.