File: test_filesystem.py

package info (click to toggle)
rednotebook 2.21%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,580 kB
  • sloc: python: 9,111; xml: 128; sh: 46; makefile: 11
file content (13 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from rednotebook.util.filesystem import get_journal_title


def test_journal_title():
    dirs = [
        ("/home/my journal", "my journal"),
        ("/my journal/", "my journal"),
        ("/home/name/Journal", "Journal"),
        ("/home/name/jörnal", "jörnal"),
        ("/", "/"),
    ]
    for path, title in dirs:
        assert get_journal_title(path) == title