Ejemplo n.º 1
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)
Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
0
 def mouseReleaseEvent(self, event):
     """QLabel virtual
     """
     if self.path:
         reveal_path(self.path)
Ejemplo n.º 6
0
 def mouseReleaseEvent(self, event):
     """QLabel virtual
     """
     if self.path:
         reveal_path(self.path)