Exemple #1
0
 def setUp(self):
     self.stash = stash.StaSh()
     self.stash('cd $STASH_ROOT')
     self.stash('BIN_PATH=$STASH_ROOT/tests:$BIN_PATH')
     self.complete = self.stash.completer.complete
else:
    if 'stash.stash' in sys.modules:
        for name in module_names:
            sys.modules.pop('stash.' + name)
    from stash import stash

# noinspection PyProtectedMember
debug = (
    # stash._DEBUG_STREAM,
    # stash._DEBUG_RENDERER,
    # stash._DEBUG_MAIN_SCREEN,
    # stash._DEBUG_MINI_BUFFER,
    # stash._DEBUG_IO,
    # stash._DEBUG_UI,
    # stash._DEBUG_TERMINAL,
    # stash._DEBUG_TV_DELEGATE,
    # stash._DEBUG_RUNTIME,
    # stash._DEBUG_PARSER,
    # stash._DEBUG_EXPANDER,
    # stash._DEBUG_COMPLETER,
)

log_setting = {
    'level': 'INFO',
    'stdout': True,
}

_stash = stash.StaSh(debug=debug, log_setting=log_setting)

_stash.launch()
Exemple #3
0
 def setUp(self):
     self.stash = stash.StaSh()
     self.stash('cd $STASH_ROOT')
     self.stash('BIN_PATH=$STASH_ROOT/system/tests/data:$BIN_PATH', persistent=True)
Exemple #4
0
 def setUp(self):
     self.stash = stash.StaSh()
     self.stash('cd $STASH_ROOT')
     self.expand = self.stash.runtime.expander.expand
Exemple #5
0
 def setUp(self):
     self.stash = stash.StaSh()
     self.stash('cd $STASH_ROOT')
     self.stash('BIN_PATH=$STASH_ROOT/system/tests/data:$BIN_PATH')
     self.stash('clear')
Exemple #6
0
# -*- coding: utf-8 -*-
"""
Launch StaSh in a way that it survives through the "globals clearing".
Globals clearing is enabled by default in Pythonista. In current v1.6
beta, it can no longer be disabled as in v1.5.
"""
import sys

if '__stash' in sys.modules:
    stash = sys.modules['__stash']
    reload(__stash)  # reload to ensure any changes to be honoured
else:
    import stash as __stash

_stash = __stash.StaSh()
_stash.run()
Exemple #7
0
 def setUp(self):
     self.stash = stash.StaSh()
     self.stash('cd $STASH_ROOT')
     self.complete = self.stash.completer.complete