-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Add test with non-ascii directory for consoles stderr file #5013
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f7a7ea
Adds test with non-ascii directory for stderr file.
dalthviz 1a6d16b
Testing.
dalthviz 913dc66
Testing.
dalthviz a300cd3
Testing.
dalthviz 9dc75d5
Improvements.
dalthviz 885db09
Testing.
dalthviz 737fd4d
Improvements.
dalthviz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -95,7 +95,8 @@ def __init__(self, plugin, id_, | |
additional_options, interpreter_versions, | ||
connection_file=None, hostname=None, | ||
menu_actions=None, slave=False, | ||
external_kernel=False, given_name=None): | ||
external_kernel=False, given_name=None, | ||
testing=False): | ||
super(ClientWidget, self).__init__(plugin) | ||
SaveHistoryMixin.__init__(self, history_filename) | ||
|
||
|
@@ -113,6 +114,7 @@ def __init__(self, plugin, id_, | |
self.stop_icon = ima.icon('stop') | ||
self.history = [] | ||
self.allow_rename = True | ||
self.testing = testing | ||
|
||
# --- Widgets | ||
self.shellwidget = ShellWidget(config=config_options, | ||
|
@@ -163,7 +165,10 @@ def stderr_file(self): | |
"""Filename to save kernel stderr output.""" | ||
if self.connection_file is not None: | ||
stderr_file = self.kernel_id + '.stderr' | ||
stderr_file = osp.join(TEMPDIR, stderr_file) | ||
if not self.testing: | ||
stderr_file = osp.join(TEMPDIR, stderr_file) | ||
else: | ||
stderr_file = osp.join(TEMPDIR, u'測試', u'اختبار', stderr_file) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also find a solution similar to the one I posted above to avoid putting this temp directory as part of our source code. |
||
return stderr_file | ||
|
||
def configure_shellwidget(self, give_focus=True): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalthviz, I don't like this test directory to be part of our sourcecode.
Please add a new parameter to
__init__
calledtest_dir=TEMPDIR
. With that this should look like:Then in our tests you can change that parameter by this directory containing Chinese and Arabic characters.