mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-23 22:38:36 +01:00
tests: Move test files to other directory.
This commit is contained in:
parent
9e2fb01222
commit
dbba94976c
@ -6,6 +6,6 @@ install:
|
||||
- pip install flake8 pylint
|
||||
|
||||
script:
|
||||
- flake8 pywal setup.py
|
||||
- pylint --ignore-imports=yes pywal setup.py
|
||||
- flake8 pywal tests setup.py
|
||||
- pylint --ignore-imports=yes pywal tests setup.py
|
||||
- python setup.py test
|
||||
|
@ -7,7 +7,7 @@ from pywal import util
|
||||
|
||||
|
||||
# Import colors.
|
||||
COLORS = util.read_file("tests/test_file")
|
||||
COLORS = util.read_file("tests/test_files/test_file")
|
||||
|
||||
|
||||
class TestExportColors(unittest.TestCase):
|
||||
@ -16,7 +16,7 @@ class TestExportColors(unittest.TestCase):
|
||||
def test_save_colors(self):
|
||||
"""> Export colors to a file."""
|
||||
tmp_file = pathlib.Path("/tmp/test_file")
|
||||
colors = util.read_file("tests/test_file")
|
||||
colors = util.read_file("tests/test_files/test_file")
|
||||
export_colors.save_colors(colors, tmp_file, "plain colors")
|
||||
result = tmp_file.is_file()
|
||||
self.assertTrue(result)
|
||||
|
@ -6,7 +6,7 @@ from pywal import util
|
||||
|
||||
|
||||
# Import colors.
|
||||
COLORS = util.read_file("tests/test_file")
|
||||
COLORS = util.read_file("tests/test_files/test_file")
|
||||
|
||||
|
||||
class TestFormatColors(unittest.TestCase):
|
||||
|
@ -2,11 +2,6 @@
|
||||
import unittest
|
||||
|
||||
from pywal import gen_colors
|
||||
from pywal import util
|
||||
|
||||
|
||||
# Import colors.
|
||||
COLORS = util.read_file("tests/test_file")
|
||||
|
||||
|
||||
class TestGenColors(unittest.TestCase):
|
||||
@ -14,13 +9,13 @@ class TestGenColors(unittest.TestCase):
|
||||
|
||||
def test_get_img(self):
|
||||
"""> Validate image file."""
|
||||
result = gen_colors.get_image("tests/test.jpg")
|
||||
self.assertEqual(result, "tests/test.jpg")
|
||||
result = gen_colors.get_image("tests/test_files/test.jpg")
|
||||
self.assertEqual(result, "tests/test_files/test.jpg")
|
||||
|
||||
def test_get_img_dir(self):
|
||||
"""> Validate image directory."""
|
||||
result = gen_colors.get_image("tests")
|
||||
self.assertEqual(result, "tests/test.jpg")
|
||||
result = gen_colors.get_image("tests/test_files")
|
||||
self.assertEqual(result, "tests/test_files/test.jpg")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -6,7 +6,7 @@ from pywal import util
|
||||
|
||||
|
||||
# Import colors.
|
||||
COLORS = util.read_file("tests/test_file")
|
||||
COLORS = util.read_file("tests/test_files/test_file")
|
||||
|
||||
|
||||
class TestSetColors(unittest.TestCase):
|
||||
|
@ -10,12 +10,12 @@ class TestUtil(unittest.TestCase):
|
||||
|
||||
def test_read_file_start(self):
|
||||
"""> Read colors from a file."""
|
||||
result = util.read_file("tests/test_file")
|
||||
result = util.read_file("tests/test_files/test_file")
|
||||
self.assertEqual(result[0], "#363442")
|
||||
|
||||
def test_read_file_end(self):
|
||||
"""> Read colors from a file."""
|
||||
result = util.read_file("tests/test_file")
|
||||
result = util.read_file("tests/test_files/test_file")
|
||||
self.assertEqual(result[15], "#C9CFD0")
|
||||
|
||||
def test_save_file(self):
|
||||
|
Loading…
Reference in New Issue
Block a user