File: test_filesystem.py

package info (click to toggle)
rednotebook 2.39%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,956 kB
  • sloc: python: 9,570; javascript: 4,103; xml: 128; sh: 58; makefile: 11
file content (16 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os

from rednotebook.util.filesystem import get_journal_title


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