1.19.01
This commit is contained in:
parent
659aa6b1b7
commit
c2b2c779f3
|
@ -15,6 +15,7 @@ before_install:
|
|||
- gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
|
||||
- sudo apt update
|
||||
- sudo apt install python3-setuptools python3-tk tor -y
|
||||
- export TZ=Europe/Helsinki
|
||||
|
||||
install:
|
||||
- pip install pytest pytest-cov pyyaml coveralls
|
||||
|
|
|
@ -59,14 +59,17 @@ class TestAskPathGui(TFCTestCase):
|
|||
self.assertEqual(ask_path_gui('path to file:', self.settings, get_file=True),
|
||||
self.file_path)
|
||||
|
||||
@unittest.skipIf("TRAVIS" in os.environ and os.environ["TRAVIS"] == "true", "Skip as Travis has no $DISPLAY.")
|
||||
@mock.patch('tkinter.filedialog.askopenfilename', return_value='')
|
||||
def test_no_path_to_file_raises_fr(self, _):
|
||||
self.assert_fr("File selection aborted.", ask_path_gui, 'test message', self.settings, True)
|
||||
|
||||
@unittest.skipIf("TRAVIS" in os.environ and os.environ["TRAVIS"] == "true", "Skip as Travis has no $DISPLAY.")
|
||||
@mock.patch('tkinter.filedialog.askdirectory', return_value=path)
|
||||
def test_get_path_gui(self, _):
|
||||
self.assertEqual(ask_path_gui('select path for file:', self.settings), self.path)
|
||||
|
||||
@unittest.skipIf("TRAVIS" in os.environ and os.environ["TRAVIS"] == "true", "Skip as Travis has no $DISPLAY.")
|
||||
@mock.patch('tkinter.filedialog.askdirectory', return_value='')
|
||||
def test_no_path_raises_fr(self, _):
|
||||
self.assert_fr("Path selection aborted.", ask_path_gui, 'test message', self.settings, False)
|
||||
|
|
Loading…
Reference in New Issue