A open-source tool for writers www.theologeek.ch/manuskript
Go to file
Curtis Gedak af53102e77 Fix pytest warning about duplicate name when running tests
When running pytest on kubuntu 16.04 the following warning was displayed:

    $ python3 -m pytest -v
    ...
    ./manuskript/load_save/version_1.py:319: \
    UserWarning: Duplicate name: 'outline/0-Folder/0-Text-3.md'
      zf.writestr(filename, content, compress_type=compression)

The error was tracked down using the following pytest invocation:

    $ python3 -m pytest -v -W error::UserWarning

This invocation showed 4 occurrences similar to the following warning:

    self = <zipfile.ZipFile filename='/tmp/tmpgs_sjpzr.msk' mode='w'>
    zinfo = <[AttributeError("compress_size") raised in repr()] \
    ZipInfo object at 0x7f3cc0124588>

        def _writecheck(self, zinfo):
            """Check for errors before writing a file to the archive."""
            if zinfo.filename in self.NameToInfo:
                import warnings
    >           warnings.warn('Duplicate name: %r' % zinfo.filename, \
                stacklevel=3)
    E           UserWarning: Duplicate name: 'outline/0-Folder/0-Text-3.md'

These warnings arose in the following 4 tests:

  - test_references
  - test_autoLoad
  - test_loadExportWiget
  - test_loadImportWiget

The cause of the issue is that in manuskript/tests/conftest.py, the
mainWindow::closeProject() method is called to close the project, but
the project was never loaded.  This meant the zip file setting
defaulted to True, when in fact the Acts sample project is not stored
in a single zip project file.

Fix by removing the call to MW.closeProject() before the project is
loaded.
2018-11-16 12:52:09 -07:00
bin Adding a bin file 2016-02-06 09:03:12 +01:00
i18n Update all language translation source .ts files 2018-08-06 11:09:58 -06:00
icons Adds Format menu to mainWindow ui 2017-11-30 11:11:01 +01:00
libs Removes unused libraries 2017-11-18 20:58:17 +01:00
manuskript Fix pytest warning about duplicate name when running tests 2018-11-16 12:52:09 -07:00
package Limit pyinstaller package build and deployment to osx in Travis CI 2018-11-15 12:25:49 -07:00
resources Theme, preview, and eternal logos 2015-06-18 21:41:56 +02:00
sample-projects Creates base classes 2017-11-15 20:34:05 +01:00
.codeclimate.yml Updates codeclimate config file 2016-03-10 16:36:28 +01:00
.gitignore Add .gitignore file patterns for Python PyDev Eclipse IDE 2018-08-02 08:57:35 -06:00
.travis.yml Prevent build and deploy steps for linux on Travis CI 2018-11-15 13:15:50 -07:00
_config.yml Set theme jekyll-theme-cayman 2017-11-23 14:42:07 +01:00
CHANGELOG.md ========== manuskript-0.7.0 ========== 2018-08-15 09:25:21 -06:00
COPYING Adds license and credits 2015-06-18 11:39:45 +02:00
CREDITS Adds license and credits 2015-06-18 11:39:45 +02:00
makefile Slight optimization through delay in Settings Windows 2017-10-19 10:38:32 +02:00
manuskript.spec Fixes spec file to include translation in releases 2016-04-01 11:53:17 +02:00
README.md Remove doubled-up word from README.md 2018-01-16 14:12:42 -07:00
TODO.t2t Updated todo 2015-07-09 16:22:26 +02:00

Manuskript

Manuskript is an open-source tool for writers.

Manuskript runs on GNU/Linux, Mac OS X, and Windows.

Main view

Features

Manuskript provides a rich environment to help writers create their first draft and then further refine and edit their masterpiece.
With Manuskript you can:

Additionally Manuskript can help in many more ways with a spell checker, markdown highlighter, frequency analyzer, and automatic save in open and plain text file format.

Download

Download and install Manuskript today.

HowTo's

See the Wiki for more detailed instructions on how to install and use Manuskript.

Contribute

You can help improve Manuskript by reporting issues, writing wiki documentation, and translating to other languages. See also Manuskript Contribute page.

Manuskript is written in Python3 and PyQt5.

Free Software

Manuskript is Free Software.
You have the freedom to run, copy, distribute, study, change and improve the software.
Manuskript is distributed under the GNU General Public License version 3 or (at your option) any later version.