synack3 / stash Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ywangd/stash
StaSh - Shell for Pythonista
License: MIT License
This project forked from ywangd/stash
StaSh - Shell for Pythonista
License: MIT License
Leveraging the CI test command in the travis.yml file and adding code coverage with python 2, the following results are returned:
---------- coverage: platform linux2, python 2.7.12-final-0 ----------
Name Stmts Miss Cover
--------------------------------------------------
__init__ 0 0 100%
bin/alias 28 5 82%
bin/cat 23 3 87%
bin/cd 24 6 75%
bin/clear 1 0 100%
bin/echo 25 10 60%
bin/grep 34 5 85%
bin/pwd 25 5 80%
bin/sort 27 1 96%
bin/source 19 4 79%
bin/totd 21 2 90%
getstash 74 74 0%
launch_stash 33 33 0%
lib/libcompleter 43 11 74%
lib/libcore 46 40 13%
lib/librunner 63 49 22%
stash 156 25 84%
system/__init__ 0 0 100%
system/dummyconsole 6 6 0%
system/dummyobjc_util 46 8 83%
system/dummyui 60 18 70%
system/shcommon 194 73 62%
system/shio 99 63 36%
system/shiowrapper 34 9 74%
system/shparsers 549 126 77%
system/shruntime 394 147 63%
system/shscreens 354 156 56%
system/shstreams 198 118 40%
system/shterminal 258 173 33%
system/shthreads 193 65 66%
system/shui 263 66 75%
system/shuseractionproxy 64 27 58%
system/tests/__init__ 0 0 100%
system/tests/data/test05 11 0 100%
system/tests/data/test_101_1 4 0 100%
system/tests/data/test_102_1 5 0 100%
system/tests/data/test_102_2 5 0 100%
system/tests/data/test_12 7 0 100%
system/tests/data/test_12_1 2 0 100%
system/tests/data/test_12_2 2 0 100%
system/tests/data/test_201 1 0 100%
system/tests/data/test_202 1 0 100%
system/tests/data/test_203 1 0 100%
system/tests/data/test_204 1 0 100%
system/tests/test_completer 53 0 100%
system/tests/test_expander 71 0 100%
system/tests/test_runtime 50 1 98%
system/tests/test_termemu 28 0 100%
system/tests/test_threads 36 0 100%
--------------------------------------------------
TOTAL 3632 1329 63%
There are 66 files in bin/ which do not appear to be tested presently:
Both in local dev and Travis, I am intermittently seeing the following failures:
=================================== FAILURES ===================================
____________________________ ThreadsTests.test_102 _____________________________
self = <stash.system.tests.test_threads.ThreadsTests testMethod=test_102>
def test_102(self):
"""
Two parallel threads with same stdout should interleave
"""
outs = StringIO()
self.stash('test_102_1.py &', final_outs=outs)
self.stash('test_102_2.py &', final_outs=outs)
time.sleep(7)
s = outs.getvalue()
> assert 0 < s.find('test_102_2.py') < len(s)/2, 'Output do not interleave'
E AssertionError: Output do not interleave
E assert 0 < 0
E + where 0 = <built-in method find of str object at 0x7f5ac5b5f3c8>('test_102_2.py')
E + where <built-in method find of str object at 0x7f5ac5b5f3c8> = 'test_102_2.py\ntest_102_1.py\ntest_102_2.py\ntest_102_1.py\ntest_102_2.py\ntest_102_1.py\ntest_102_2.py\ntest_102_1.py\ntest_102_2.py\ntest_102_1.py\n'.find
../system/tests/test_threads.py:42: AssertionError
===================== 1 failed, 35 passed in 20.33 seconds =====================
The command "py.test system/tests --ignore=system/tests/data" exited with 1.
Git add seems to have an inconsistent behavior for finding a requested file to add. In the following example, trying to add a locally referenced returns a path relative to git root, but trying the same add from git root seems to want the full path:
[bin]$ git status
STAGED
UNSTAGED LOCAL MODS
['bin/git.py']
[bin]$ git add git.py
bin/git.py does not exist. skipping
[bin]$ cd ..
[stash-dev]$ git add git.py
git.py does not exist. skipping
The expected behavior should be to check/add the local file in the first case (not the second).
Attempting to launch stash w/python3 is currently resulting in the following error:
stash.py: line 12: No module named ‘ConfigParser’
Pythonista 3.1 (301016)
iOS 11.2.1 (64-bit iPad6,3)
stash.py: 2017-12-30 03:52:24
Currently, git branch outputs in the form of:
branchnameshort_commit
Add a space to the output as:
branchname short_commit
**=============================================================== FAILURES ================================================================
___________________________________________________ CompleterTests.test_completion_11 ___________________________________________________
self = <stash.system.tests.test_completer.CompleterTests testMethod=test_completion_11>
def test_completion_11(self):
newline, possibilities = self.complete('ls $STASH_ROOT/bi')
> assert newline.replace('\\', '/') == 'ls $STASH_ROOT/bin/'
E AssertionError: assert 'ls $STASH_ROOT/bin' == 'ls $STASH_ROOT/bin/'
E - ls $STASH_ROOT/bin
E + ls $STASH_ROOT/bin/
E ? +
system/tests/test_completer.py:65: AssertionError
================================================= 1 failed, 34 passed in 23.88 seconds ==================================================
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.