Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.65 KB

setup.md

File metadata and controls

56 lines (40 loc) · 2.65 KB

Getting started

Create Virtual Environment (venv)

python3.7 -m venv .venv
pip3 install --no-cache-dir -r requirements.txt

Special care to be taken for handling unicode tamil characters

git

By default, git will print non-ASCII file names in quoted octal notation, i.e. "\nnn\nnn...". This can be disabled with:

git config --global core.quotepath off

Terminal

  • on ubuntu 18.04 KDE konsole works well with tamil characters.
  • on ubuntu 19.04 Tilix works well when cell space set to 2.0 . Konsole renders bad

vscode

The library was built using vscode. VScode Jedi didn't display tamil function names in outline window and intellisense. To fix this switch to language server instead of Jedi (set "python.jediEnabled": false in your settings.json). I have raised a bug with Vscode

Function names with unicode (indic characters) are not displayed in Outline window #6454

python package installation

To install this package use the pip application command as follows [இந்த நிரல் தொகுப்பை நிறுவவதற்கு இப்படி pip செயலியில் கட்டளை இடவேண்டும்.] $ python3 -m pip install setup.py --user

pytest

pytest escapes unicode strings while printing on stdout. I guess, Vscode uses the same output so the UI listing of test cases also has excaped unicode strings.

tests/test_1.py::test_தொடர்மொழி_ஆக்கு[\u0b9a\u0bc7-\u0b85\u0b9f\u0bbf-தொடர்மொழி0] PASSED [100%]

pytest unicode escaped vscode

To fix this create set disable_test_id_escaping_and_forfeit_all_rights_to_community_support = True in pytest.ini. pytest authors warn this may break something unexpected. But works fine for me. This also fixes the vscode UI escaping unicode characters in pytest extension.

tests/test_1.py::test_தொடர்மொழி_ஆக்கு[சே-அடி-தொடர்மொழி0] PASSED [100%]

pytest unicode vscode

How to use

unit tests

cd in to top lelvel folder and run pytest.

# runn all tests
pytest
# or run speific tests
pytest test_எழுத்து.py  
pytest test_சான்று.py
pytest test_புணர்ச்சி.py