some tests (unicode) failing during test.py

Reported by alessandro on 2010-11-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Medium
Unassigned

Bug Description

new Zim version, 0.49
running under linux Fedora FC13

zim -D output:
WARNING: Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead
INFO: This is zim 0.49
DEBUG: Python version is (2, 6, 4, 'final', 0)
DEBUG: Platform is posix
DEBUG: Zim revision is:
        branch: pyzim-trunk
        revision: 321 <email address hidden>
        date: 2010-11-02 21:14:14 +0100

DEBUG: Running from a source dir: /usr/src/zim-0.49
DEBUG: Set XDG_DATA_HOME to /root/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/kde-settings/kde-profile/default/share>, <Dir: /usr/local/share>, <Dir: /usr/share>]
DEBUG: Set XDG_CONFIG_HOME to /root/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /root/.cache
DEBUG: Running command: gui
INFO: Starting UnixSocketDaemon
DEBUG: Socket address: /tmp/zim-root/daemon-socket
DEBUG: Wrote /tmp/zim-root/daemon.pid
DEBUG: Sending to daemon: ["ping",[],{}]

DEBUG: Daemon replied: "Ack"
DEBUG: First time usage - prompt for notebook folder
DEBUG: Opening dialog "Add Notebook - Zim"

Bug Description:---------------
Running test.py prior to install, I get the following:

# test.py
WARNING: Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead
Test if all modules compile ... ok
Test if included notebooks are up to date ... ok
Check base class for errors ... ok
Test link_type() ... ok
Test parsing dates ... ok
Test parsing Re class ... ok
Test parsing quoted strings ... ok
Test parsing TextBuffer class ... ok
Test encoding and decoding urls ... ok
Test Dir object ... ok
Test File object ... FAIL
Test FileHandle object ... ok
testFunctions (tests.fs.TestFS) ... ok
Test Path object ... ok
Test TmpFile object ... ok
Test file overwrite check ... ok
Test file operations are safe for symlinks ... ok
Test ListDict class ... ok
Test lookup of config files ... ok
Test config file format ... ok
Test default basedir paths ... ok
Test config environment is valid ... ok
Test config environemnt with non-default basedir paths ... ok
Test config environment is valid ... ok
Test config environment setup of test ... ok
Test HeadersDict class ... ok
Test HierarchicDict class ... ok
Test config for user dirs ... ok
Test parsing of .desktop Exec strings ... ok
Test CustomToolManager API ... ok
Test parsing of custom tool Exec strings ... ok
Test HTML encoding ... ok
Test exporting wiki format to Html ... ok
test the escaping of certain characters ... ok
test the export of a wiki page to latex ... WARNING: No document type set in template, assuming "report"
ok
testExtend (tests.formats.TestParseTree) ... ok
Test ParseTree.set_heading() ... ok
Test ParseTree.cleanup_headings() ... ok
Test ParseTree.fromstring() and .tostring() ... ok
Test ParseTreeBuilder class ... ok
Test dumping page to plain text ... ok
Test roundtrip for plain text ... ok
Test backward compatibility for wiki format ... ok
testDumping (tests.formats.TestWikiFormat) ... ok
Test iterator function for link ... ok
Test wiki parse tree generation. ... ok
Test roundtrip for wiki text ... ok
Test support for unicode bullets in source ... ok
Test Template invalid syntax raises TemplateError ... ok
Test Template processing simple statements without page ... ok
runTest (tests.templates.TestPageProxy) ... ok
runTest (tests.templates.TestTemplate) ... ok
runTest (tests.templates.TestTemplateDict) ... ok
runTest (tests.templates.TestTemplateParam) ... ok
Load all shipped templates for syntax check ... ok
Test we get a proper index for files store ... ERROR
Test moving and deleting pages in the files store ... ERROR
Test we get a proper index for the memory store ... ok
Test moving and deleting pages in the memory store ... ok
Test mapping page names to filenames ... ok
testContent (tests.stores.TextXMLStore) ... ok
Test we get a proper index for the XML store ... ok
Test indexing ... ok
Test indexing files ... ok
Test PageTreeStore index interface ... ok
Test PageTreeStore index interface with files index ... ok
runTest (tests.notebook.TestGetNotebook) ... ERROR
Test index page generation ... ok
Try populating a notebook from scratch ... ok
Test various notebook methods ... ok
Test renaming, moving and deleting pages in the notebook ... ok
Test notebook.resolve_file() ... ok
Test notebook.resolve_path() ... ok
Test logic for updating links on move ... ok
Test Page object ... ok
Test Path object ... ok
Test getting namespace from history ... ok
Test if deleted pages and their children show up in unique history list ... ok
Walk back and forth through the history ... ok
Test parsing the history from the state file ... ok
Get recent pages from history ... ok
Test loading default plugins ... ok
Test loading plugins and meta data ... ok
Test export notebook to html ... ok
Test export notebook to html from commandline ... WARNING: Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead
ok
Test export notebook to html with all options ... ok
runTest (tests.export.TestLinker) ... ok
Test WWW interface ... ok
Test WWW interface with a template ... ok
Test search API ... ok
Test search API with file based notebook ... ok
Test regex compilation for search terms ... ok
runTest (tests.pageview.TestFind) ... ok
Test interaction for lists ... ok
Test serialization of the page view textbuffer ... ok
runTest (tests.pageview.TestTextView) ...
!! Two GtkWarnings expected here for gdk display !!
/usr/src/zim-0.49/zim/gui/pageview.py:2267: GtkWarning: gdk_drawable_get_display: assertion `GDK_IS_DRAWABLE (drawable)' failed
  elif not gtk.TextView.do_key_press_event(self, event):
/usr/src/zim-0.49/zim/gui/pageview.py:2267: GtkWarning: gdk_keymap_get_for_display: assertion `GDK_IS_DISPLAY (display)' failed
  elif not gtk.TextView.do_key_press_event(self, event):
ok
Test the undo/redo functionality ... ok
Test Calendar plugin ... ok
Test PrintToBrowser plugin ... ok
Test Bazaar version control ...
!! Some raw output from Bazaar expected here !!
Committing to: /usr/src/zim-0.49/tests/tmp/test_versioncontrol/versioncontrol_TestBazaar/
added .bzrignore
added foo
added foo/bar
added foo/bar/baz.txt
Committed revision 1.
 M foo/bar/baz.txtlution pass 1/10
Committing to: /usr/src/zim-0.49/tests/tmp/test_versioncontrol/versioncontrol_TestBazaar/
modified foo/bar/baz.txt
Committed revision 2.
okgetting stream 0/2
Test InlineCalculator plugin ... ok
Test Equation Editor plugin ... ok
Test Diagram Editor plugin ... ok

======================================================================
ERROR: Test we get a proper index for files store
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/zim-0.49/tests/stores.py", line 278, in setUp
    tmpdir = tests.create_tmp_dir(u'stores_TestFiles_\u0421\u0430\u0439')
  File "/usr/src/zim-0.49/tests/__init__.py", line 61, in create_tmp_dir
    dir = dir.encode(sys.getfilesystemencoding())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 27-29: ordinal not in range(128)

======================================================================
ERROR: Test moving and deleting pages in the files store
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/zim-0.49/tests/stores.py", line 278, in setUp
    tmpdir = tests.create_tmp_dir(u'stores_TestFiles_\u0421\u0430\u0439')
  File "/usr/src/zim-0.49/tests/__init__.py", line 61, in create_tmp_dir
    dir = dir.encode(sys.getfilesystemencoding())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 27-29: ordinal not in range(128)

======================================================================
ERROR: runTest (tests.notebook.TestGetNotebook)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/zim-0.49/tests/notebook.py", line 28, in runTest
    root = Dir(tests.create_tmp_dir(u'notebook_TestGetNotebook_\u0421\u0430\u0439'))
  File "/usr/src/zim-0.49/tests/__init__.py", line 61, in create_tmp_dir
    dir = dir.encode(sys.getfilesystemencoding())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-37: ordinal not in range(128)

======================================================================
FAIL: Test File object
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/zim-0.49/tests/fs.py", line 188, in testFile
    self.assertRaises(FileWriteError, file.write, 'Overwritten!')
AssertionError: FileWriteError not raised

----------------------------------------------------------------------
Ran 103 tests in 20.159s

FAILED (failures=1, errors=3)

Changed in zim:
status: New → Confirmed
importance: Undecided → Medium

Filesystem encoding logic has been improved in recent versions, please re-test if these error still occur

Changed in zim:
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Zim because there has been no activity for 60 days.]

Changed in zim:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers