-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor mocking sublime and sublime_plugin
- Loading branch information
Showing
7 changed files
with
71 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
import os | ||
import re | ||
import subprocess | ||
import sys | ||
|
||
from subprocess import check_output | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import sys | ||
|
||
from . import mock_sublime | ||
from . import mock_sublime_plugin | ||
|
||
sys.modules['sublime'] = mock_sublime | ||
sys.modules['sublime_plugin'] = mock_sublime_plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Mock module for ``sublime`` in Sublime Text. | ||
""" | ||
|
||
import sys | ||
|
||
# find flags | ||
LITERAL = 1 | ||
IGNORECASE = 2 | ||
WHOLEWORD = 4 | ||
REVERSE = 8 | ||
WRAP = 16 | ||
|
||
|
||
def arch(): | ||
return 'x64' | ||
|
||
|
||
def platform(): | ||
if sys.platform == 'darwin': | ||
return 'osx' | ||
if sys.platform == 'win32': | ||
return 'windows' | ||
return 'linux' | ||
|
||
|
||
def version(): | ||
return '4126' | ||
|
||
|
||
def load_settings(self, **kargs): | ||
pass | ||
|
||
|
||
def status_message(msg): | ||
pass | ||
|
||
|
||
def error_message(msg): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Mock module for ``sublime_plugin`` in Sublime Text. | ||
""" | ||
|
||
all_callbacks = { | ||
'on_load': [] | ||
} | ||
|
||
|
||
class WindowCommand(object): | ||
pass | ||
|
||
|
||
class TextCommand(object): | ||
pass | ||
|
||
|
||
class EventListener(object): | ||
pass |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters