Commit graph

15 commits

Author SHA1 Message Date
luz.paz 2fd45dc42c Fix misc. typos
Found via `codespell -q 3 -S *.ts,./libs,./sample-projects -L searchin`
2019-09-19 09:58:24 -06:00
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
Olivier Keshavjee 43c82cb3c9 Adds: simple ui tests for exporter and importer widgets 2017-11-22 11:27:21 +01:00
Olivier Keshavjee f945387066 Adds unit test for #225: Manuskript fails to run in Ubuntu 14.04 2017-11-22 09:08:54 +01:00
Olivier Keshavjee 8ff046b23b Extends coverage in settingsWindow 2017-11-20 23:26:22 +01:00
Olivier Keshavjee a7f668c2bf Fixes test_settingsWindow and clean up 2017-11-20 22:35:39 +01:00
Olivier Keshavjee b9e35c8709 Adds unit tests for settingWindow 2017-11-20 22:24:47 +01:00
Olivier Keshavjee 9d3b64de8f Adds: references tests, corrects bugs 2017-11-20 15:42:30 +01:00
Olivier Keshavjee 7db2848474 This should build with SemaphoreCI 2017-11-19 17:54:04 +01:00
Olivier Keshavjee f098e74f45 Adds: unit test coverage for outlineItem 2017-11-19 16:03:18 +01:00
Olivier Keshavjee 584b0b04a6 Checkpoint: revisions 2017-11-19 15:29:38 +01:00
Olivier Keshavjee a0fac27e07 Checkpoint: outlineItem tests 2017-11-19 01:36:58 +01:00
Olivier Keshavjee 159e1c3f75 Adds mainWindow and completes function.py coverage 2017-11-19 00:54:11 +01:00
Olivier Keshavjee 1a5fdc7b1f Adds unit tests for functions 2017-11-19 00:20:49 +01:00
Olivier Keshavjee 84466b90e3 Adding unit test 2017-11-18 22:07:10 +01:00