Ghini / ghini.desktop

plant collections manager (desktop version)
http://ghini.github.io/
GNU General Public License v2.0
24 stars 14 forks source link

clean unit tests after moving to Python3 #355

Closed mfrasca closed 6 years ago

mfrasca commented 6 years ago

we start from FAILED (SKIP=12, errors=301, failures=6), we probably do not have all unit tests now on ghini-1.0-dev.

mfrasca commented 6 years ago

FAILED (SKIP=23, errors=5, failures=13)

mfrasca commented 6 years ago

FAILED (SKIP=23, errors=1, failures=7) the remaining error and one of the failures are nasty, associated to strings and bytes, and could lead us to leaving the pyqrcode library. the failures I haven't inspected …

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/garden/test.py", line 751, in test_cutting_editor
    self.assertEqual(v, value)
AssertionError: None != 'Auxin powder'

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/garden/test.py", line 797, in test_seed_editor_commit
    self.assertEqual(v, expected)
AssertionError: None != 'tray'

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/garden/test.py", line 864, in test_seed_editor_load
    self.assertEqual(value, default)
AssertionError: None != 'standard mix'

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/imex/test.py", line 488, in test_writes_complete_database
    self.assertTrue(o1 in target, o1)
AssertionError: False is not true : {'private': False, 'code': '2015.0001', 'id_qual': '', 'species': 'Calopogon tuberosus', 'object': 'accession'}

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/plants/test_asktpl.py", line 54, in test_simple_answer
    self.assertEqual(infolog[0], 'Mangifera indica L. (Anacardiaceae)')
AssertionError: 'nothing matches' != 'Mangifera indica L. (Anacardiaceae)'
- nothing matches
+ Mangifera indica L. (Anacardiaceae)

Traceback (most recent call last):
  File "/home/mario/Local/github/Ghini/ghini.desktop/bauble/plugins/plants/test_asktpl.py", line 61, in test_taxon_is_synonym
    self.assertEqual(len(infolog), 2)
AssertionError: 1 != 2
mfrasca commented 6 years ago

we now have 566 unit tests, and the summary says: FAILED (SKIP=23, errors=2, failures=6)

I split the tests for mako templates, in three categories *-qr.ps, *-qr.svg, all the rest,

mfrasca commented 6 years ago

so, about "cleaning up unit tests", we are now at at only the three failures associated to propagations, and it does need cleaning up the interface — #362