porcupine
porcupine copied to clipboard
treeview item errors when running tests
In #831 I changed an error handler to not be used when running tests, which reveals this error that doesn't cause tests to fail but should be fixed anyway:
(env) akuli@akuli-desktop:~/porcu$ xvfb-run python3 -m pytest
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /home/akuli/porcu, configfile: pytest.ini, testpaths: porcupine/plugins/autoindent.py, tests/
plugins: mock-3.5.1, cov-2.11.1
collected 424 items
porcupine/plugins/autoindent.py .
tests/test_about_dialog.py log file: /tmp/tmpfu1quaj0/logs/2021-10-11T00-22-26.txt
..
tests/test_autocomplete_plugin.py ....
tests/test_cli.py ..
tests/test_comment_block_plugin.py ...
tests/test_copyright.py ..
tests/test_default_keybindings.py ..
tests/test_directory_tree_plugin.py .Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
return self.func(*args)
File "/usr/lib/python3.7/tkinter/__init__.py", line 749, in callit
func(*args)
File "/home/akuli/porcu/porcupine/plugins/git_status.py", line 114, in check
self._handle_queue()
File "/home/akuli/porcu/porcupine/plugins/git_status.py", line 147, in _handle_queue
if not self.tree.contains_dummy(dir_id):
File "/home/akuli/porcu/porcupine/plugins/directory_tree.py", line 217, in contains_dummy
children = self.get_children(parent)
File "/usr/lib/python3.7/tkinter/ttk.py", line 1226, in get_children
self.tk.call(self._w, "children", item or '') or ())
_tkinter.TclError: Item project:3:/tmp/pytest-of-akuli/pytest-449/test_adding_nested_projects0 not found
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
return self.func(*args)
File "/usr/lib/python3.7/tkinter/__init__.py", line 749, in callit
func(*args)
File "/home/akuli/porcu/porcupine/plugins/git_status.py", line 114, in check
self._handle_queue()
File "/home/akuli/porcu/porcupine/plugins/git_status.py", line 147, in _handle_queue
if not self.tree.contains_dummy(dir_id):
File "/home/akuli/porcu/porcupine/plugins/directory_tree.py", line 217, in contains_dummy
children = self.get_children(parent)
File "/usr/lib/python3.7/tkinter/ttk.py", line 1226, in get_children
self.tk.call(self._w, "children", item or '') or ())
_tkinter.TclError: Item project:2:/tmp/pytest-of-akuli/pytest-449/test_adding_nested_projects0/a/b not found