File: test_i18n.py

package info (click to toggle)
jupyter-notebook 6.4.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,860 kB
  • sloc: javascript: 20,765; python: 15,658; makefile: 255; sh: 160
file content (7 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
from notebook import i18n

def test_parse_accept_lang_header():
    palh = i18n.parse_accept_lang_header
    assert palh('') == []
    assert palh('zh-CN,en-GB;q=0.7,en;q=0.3') == ['en', 'en_GB', 'zh', 'zh_CN']
    assert palh('nl,fr;q=0') == ['nl']