-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Buck Ryan
committed
Jul 2, 2018
1 parent
067202f
commit feb9c85
Showing
4 changed files
with
42 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ RUN apk add --no-cache --update \ | |
git \ | ||
mercurial \ | ||
php5 \ | ||
subversion && \ | ||
subversion \ | ||
&& \ | ||
rm -rf /var/cache/apk/* | ||
|
||
RUN mkdir /code | ||
|
@@ -22,7 +23,9 @@ RUN bzr whoami "root <[email protected]>" && \ | |
git config --global user.email "[email protected]" && \ | ||
git config --global user.name "root" | ||
|
||
COPY . ./ | ||
RUN ./setup.py install | ||
# COPY . ./ | ||
# RUN ./setup.py install | ||
|
||
ENV USER root | ||
|
||
CMD ["nosetests"] |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/sh | ||
set -eu | ||
docker build -t powerline-shell . | ||
docker run --rm -it powerline-shell nosetests "$@" | ||
docker run --rm --interactive --tty \ | ||
--volume $PWD:/code \ | ||
powerline-shell "$@" |
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,32 @@ | ||
import tempfile | ||
import unittest | ||
import shutil | ||
import mock | ||
import sh | ||
import powerline_shell.segments.svn as svn | ||
from ..testing_utils import dict_side_effect_fn | ||
|
||
|
||
class SvnTest(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.powerline = mock.MagicMock() | ||
self.powerline.segment_conf.side_effect = dict_side_effect_fn({ | ||
("vcs", "show_symbol"): False, | ||
}) | ||
|
||
self.dirname = tempfile.mkdtemp() | ||
sh.cd(self.dirname) | ||
# sh.svn("init", ".") | ||
|
||
self.segment = svn.Segment(self.powerline, {}) | ||
|
||
def tearDown(self): | ||
shutil.rmtree(self.dirname) | ||
|
||
@mock.patch("powerline_shell.utils.get_PATH") | ||
def test_svn_not_installed(self, get_PATH): | ||
get_PATH.return_value = "" # so svn can't be found | ||
self.segment.start() | ||
self.segment.add_to_powerline() | ||
self.assertEqual(self.powerline.append.call_count, 0) |