def test_reveal_path_windows(self, mock_subprocess):
     "User reveals a path"
     with temp_directory_with_files() as tempdir:
         path = tempdir / 'xyz'
         path.touch()
         reveal_path(path)
         expected = "explorer.exe /select,{0}".format(path.resolve())
         mock_subprocess.assert_called_once_with(expected)
Esempio n. 2
0
 def test_reveal_path_windows(self, mock_subprocess):
     "User reveals a path"
     with temp_directory_with_files() as tempdir:
         path = tempdir / 'xyz'
         path.touch()
         reveal_path(path)
         expected = "explorer.exe /select,{0}".format(path.resolve())
         mock_subprocess.assert_called_once_with(expected)
Esempio n. 3
0
 def test_reveal_path_os_x(self, mock_subprocess):
     "User reveals a path"
     with temp_directory_with_files() as tempdir:
         path = tempdir / 'xyz'
         path.touch()
         reveal_path(path)
         expected = [
             '/usr/bin/osascript', '-e',
             'tell application "Finder" to reveal POSIX file "{0}"'.format(
                 str(path.resolve()))
         ]
         mock_subprocess.assert_any_call(expected)
 def test_reveal_path_os_x(self, mock_subprocess):
     "User reveals a path"
     with temp_directory_with_files() as tempdir:
         path = tempdir / 'xyz'
         path.touch()
         reveal_path(path)
         expected = [
             '/usr/bin/osascript',
             '-e',
             'tell application "Finder" to reveal POSIX file "{0}"'.format(
                 str(path.resolve())
             )
         ]
         mock_subprocess.assert_any_call(expected)
Esempio n. 5
0
 def mouseReleaseEvent(self, event):
     """QLabel virtual
     """
     if self.path:
         reveal_path(self.path)
 def mouseReleaseEvent(self, event):
     """QLabel virtual
     """
     if self.path:
         reveal_path(self.path)