File: test_stream_unicode.py

package info (click to toggle)
python-memory-profiler 0.61-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 540 kB
  • sloc: python: 2,220; makefile: 33
file content (14 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8  -*-

from memory_profiler import profile

f = open('/dev/null', 'w')
@profile(stream=f)
def test_unicode(txt):
    # test when unicode is present
    txt = txt.replace (u"ی", u"ي") #Arabic Yah = ي
    return txt


if __name__ == '__main__':
	test_unicode (u"ایست")