diff options
| author | Matthew Leonberger <linuxunil@gmail.com> | 2017-09-26 08:58:44 +0900 |
|---|---|---|
| committer | Matthew Leonberger <linuxunil@gmail.com> | 2017-09-26 08:58:44 +0900 |
| commit | 91e48e19bca3cf46f6e403a320638246b3d1b215 (patch) | |
| tree | 9ee9086662a26ff5d143606d1d9f206d9e98096b | |
| parent | 8020f9f214aa1c568eaaa8a6545ccebacb5cd836 (diff) | |
Fix MacOS Unittests
Tests now check which OS we are on and use the appropriate escapes
Merge remote-tracking branch 'origin/hotfix/unittests' into hotfix/unittests
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rwxr-xr-x | tests/test_sequences.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index c4bf594..97204bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ matrix: before_install: - brew install imagemagick - brew install python3 - - brew link --overwite python3 - - pip3 install flake8 pylint + - virtualenv env -p python3 + - source env/bin/activate - os: linux python: 3.5 - os: linux diff --git a/tests/test_sequences.py b/tests/test_sequences.py index 6488298..2a993f5 100755 --- a/tests/test_sequences.py +++ b/tests/test_sequences.py @@ -5,7 +5,6 @@ import platform from pywal import sequences from pywal import util - # Import colors. COLORS = util.read_file_json("tests/test_files/test_file.json") @@ -17,6 +16,7 @@ class Testsequences(unittest.TestCase): """> Create special escape sequence.""" util.Color.alpha_num = 100 result = sequences.set_special(11, COLORS["special"]["background"]) + if platform.uname()[0] == "Darwin": self.assertEqual(result, "\033]Ph1F211E\033\\") else: @@ -26,6 +26,7 @@ class Testsequences(unittest.TestCase): """> Create special escape sequence with alpha.""" util.Color.alpha_num = 99 result = sequences.set_special(11, COLORS["special"]["background"]) + if platform.uname()[0] == "Darwin": self.assertEqual(result, "\033]Ph1F211E\033\\") else: @@ -34,6 +35,7 @@ class Testsequences(unittest.TestCase): def test_set_color(self): """> Create color escape sequence.""" result = sequences.set_color(11, COLORS["colors"]["color0"]) + if platform.uname()[0] == "Darwin": self.assertEqual(result, "\033]Pb1F211E\033\\") else: |
