Exemple #1
0
 def on_double_click(self, item):
     open_enclosing_folder(self.itemWidget(item).path)
Exemple #2
0
def test_open_enclosing_folder(platform, args, monkeypatch):
    m = MagicMock()
    monkeypatch.setattr('subprocess.Popen', m)
    monkeypatch.setattr('sys.platform', platform)
    open_enclosing_folder('/test/path/file.txt')
    assert m.mock_calls == [call(args)]
def test_open_enclosing_folder(platform, mocked_call, args, monkeypatch):
    m = MagicMock()
    monkeypatch.setattr(mocked_call, m)
    monkeypatch.setattr("sys.platform", platform)
    open_enclosing_folder("/test/path/file.txt")
    assert m.mock_calls == [call(args)]