1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

add travis config

This commit is contained in:
William Ting 2013-12-31 17:15:25 -06:00
parent fb1f397fee
commit cc9b7c28cf
2 changed files with 20 additions and 1 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: python
python:
- 2.7
install:
- pip install --use-mirrors testify
script:
- testify -v tests

View File

@ -1,13 +1,18 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os
import mock import mock
from testify import TestCase from testify import TestCase
from testify import assert_equal from testify import assert_equal
from testify import assert_false
from testify import assert_true
from testify import run from testify import run
import autojump_utils import autojump_utils
from autojump_utils import decode from autojump_utils import decode
from autojump_utils import first from autojump_utils import first
from autojump_utils import in_bash
from autojump_utils import last from autojump_utils import last
from autojump_utils import sanitize from autojump_utils import sanitize
from autojump_utils import second from autojump_utils import second
@ -55,7 +60,11 @@ class IterationTestCase(TestCase):
class EnvironmentalVariableTestCase(TestCase): class EnvironmentalVariableTestCase(TestCase):
pass def test_in_bash(self):
os.environ['SHELL'] = '/bin/bash'
assert_true(in_bash())
os.environ['SHELL'] = '/usr/bin/zsh'
assert_false(in_bash())
if __name__ == "__main__": if __name__ == "__main__":