Skip to content

Commit

Permalink
Moved manual_tests.py to tests/testing/ due SystemError
Browse files Browse the repository at this point in the history
SublimeText/UnitTesting#67
SystemError: Parent module '' not loaded, cannot perform relative import
  • Loading branch information
evandrocoan committed Jan 28, 2018
1 parent f955b96 commit 6708d68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions all/debug_tools/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

from logging import Logger
from logging import Manager
from logging import PlaceHolder

from logging import DEBUG
from logging import WARNING
Expand Down Expand Up @@ -466,9 +467,11 @@ def _fixChildren(self):
for logger_name in loggers:
logger = loggers[logger_name]

# i.e., if logger.parent.name.startswith( parent_name )
if logger.parent.name[:parent_name_length] == parent_name:
logger.disable()
if not isinstance( logger, PlaceHolder ):

# i.e., if logger.parent.name.startswith( parent_name )
if logger.parent.name[:parent_name_length] == parent_name:
logger.disable()

@classmethod
def get_debug_file_path(cls, output_file):
Expand Down
Empty file added tests/testing/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion tests/manual_tests.py → tests/testing/manual_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

try:
# To run this file, run on the Sublime Text console:
# import sublime_plugin; sublime_plugin.reload_plugin( "PythonDebugTools.tests.manual_tests" )
# import sublime_plugin; sublime_plugin.reload_plugin( "PythonDebugTools.tests.testing.manual_tests" )
import sublime_plugin

# Import and reload the debugger
Expand Down

0 comments on commit 6708d68

Please sign in to comment.