mirror of
https://github.com/gryf/fs-uae-wrapper.git
synced 2026-10-06 04:20:33 +02:00
Added dummy message class for systems with python without tk
This commit is contained in:
1 parent
59bd1b6029
commit
7b0ef15eae
3 files changed
+38
-2
No files matched your search
@@ -2,6 +2,7 @@ import os
|
||||
from unittest import TestCase, mock
|
||||
|
||||
from fs_uae_wrapper import message
|
||||
from fs_uae_wrapper import nogui_message
|
||||
|
||||
if os.environ.get('DISPLAY'):
|
||||
import tkinter as tk
|
||||
@@ -38,6 +39,19 @@ class TestMessage(TestCase):
|
||||
msg._process.join.assert_called_once()
|
||||
|
||||
|
||||
class TestNOPMessage(TestCase):
|
||||
|
||||
@mock.patch('sys.stdout.write')
|
||||
def test_show(self, stdout_write):
|
||||
msg = nogui_message.Message('display that')
|
||||
msg.show()
|
||||
stdout_write.assert_called_once()
|
||||
|
||||
def test_close(self):
|
||||
msg = nogui_message.Message('display that')
|
||||
self.assertIsNone(msg.close())
|
||||
|
||||
|
||||
if os.environ.get('DISPLAY'):
|
||||
# Tkinter needs graphic environment for the widgets
|
||||
class TestSpawn(TestCase):
|
||||
|
||||
Reference in new issue
Block a user