From 57100062af3f205aceae99196c94cd6bc1a395c0 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Thu, 12 Oct 2017 00:22:25 +0200 Subject: [PATCH] Rename test/ to tests/ --- setup.py | 4 ++-- {test => tests}/__init__.py | 0 {test => tests}/iap15f2k61s2.yml | 0 {test => tests}/stc12c2052ad.yml | 0 {test => tests}/stc12c5a60s2.yml | 0 {test => tests}/stc15f104e.yml | 0 {test => tests}/stc15l104w.yml | 0 {test => tests}/stc15w4k56s4.yml | 0 {test => tests}/stc89c52rc.yml | 0 {test => tests}/test_fuzzing.py | 16 ++++++++-------- {test => tests}/test_program.py | 14 +++++++------- {test => tests}/test_utils.py | 0 12 files changed, 17 insertions(+), 17 deletions(-) rename {test => tests}/__init__.py (100%) rename {test => tests}/iap15f2k61s2.yml (100%) rename {test => tests}/stc12c2052ad.yml (100%) rename {test => tests}/stc12c5a60s2.yml (100%) rename {test => tests}/stc15f104e.yml (100%) rename {test => tests}/stc15l104w.yml (100%) rename {test => tests}/stc15w4k56s4.yml (100%) rename {test => tests}/stc89c52rc.yml (100%) rename {test => tests}/test_fuzzing.py (93%) rename {test => tests}/test_program.py (91%) rename {test => tests}/test_utils.py (100%) diff --git a/setup.py b/setup.py index 73521cf..a027db3 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ from setuptools import setup, find_packages setup( name = "stcgal", version = stcgal.__version__, - packages = find_packages(exclude=["doc", "test"]), + packages = find_packages(exclude=["doc", "tests"]), install_requires = ["pyserial"], extras_require = { "usb": ["pyusb>=1.0.0"] @@ -55,6 +55,6 @@ setup( "Topic :: Software Development :: Embedded Systems", "Topic :: Software Development", ], - test_suite = "test", + test_suite = "tests", tests_require = ["PyYAML"], ) diff --git a/test/__init__.py b/tests/__init__.py similarity index 100% rename from test/__init__.py rename to tests/__init__.py diff --git a/test/iap15f2k61s2.yml b/tests/iap15f2k61s2.yml similarity index 100% rename from test/iap15f2k61s2.yml rename to tests/iap15f2k61s2.yml diff --git a/test/stc12c2052ad.yml b/tests/stc12c2052ad.yml similarity index 100% rename from test/stc12c2052ad.yml rename to tests/stc12c2052ad.yml diff --git a/test/stc12c5a60s2.yml b/tests/stc12c5a60s2.yml similarity index 100% rename from test/stc12c5a60s2.yml rename to tests/stc12c5a60s2.yml diff --git a/test/stc15f104e.yml b/tests/stc15f104e.yml similarity index 100% rename from test/stc15f104e.yml rename to tests/stc15f104e.yml diff --git a/test/stc15l104w.yml b/tests/stc15l104w.yml similarity index 100% rename from test/stc15l104w.yml rename to tests/stc15l104w.yml diff --git a/test/stc15w4k56s4.yml b/tests/stc15w4k56s4.yml similarity index 100% rename from test/stc15w4k56s4.yml rename to tests/stc15w4k56s4.yml diff --git a/test/stc89c52rc.yml b/tests/stc89c52rc.yml similarity index 100% rename from test/stc89c52rc.yml rename to tests/stc89c52rc.yml diff --git a/test/test_fuzzing.py b/tests/test_fuzzing.py similarity index 93% rename from test/test_fuzzing.py rename to tests/test_fuzzing.py index 92f7fc8..52864b9 100644 --- a/test/test_fuzzing.py +++ b/tests/test_fuzzing.py @@ -29,7 +29,7 @@ from unittest.mock import patch import yaml import stcgal.frontend import stcgal.protocols -from test.test_program import get_default_opts, convert_to_bytes +from tests.test_program import get_default_opts, convert_to_bytes class ByteArrayFuzzer: """Fuzzer for byte arrays""" @@ -78,13 +78,13 @@ class TestProgramFuzzed(unittest.TestCase): def test_program_fuzz(self, err, out, sleep_mock, serial_mock, write_mock, read_mock): """Test programming cycles with fuzzing enabled""" yml = [ - "./test/iap15f2k61s2.yml", - "./test/stc12c2052ad.yml", - "./test/stc15w4k56s4.yml", - "./test/stc12c5a60s2.yml", - "./test/stc89c52rc.yml", - "./test/stc15l104w.yml", - "./test/stc15f104e.yml", + "./tests/iap15f2k61s2.yml", + "./tests/stc12c2052ad.yml", + "./tests/stc15w4k56s4.yml", + "./tests/stc12c5a60s2.yml", + "./tests/stc89c52rc.yml", + "./tests/stc15l104w.yml", + "./tests/stc15f104e.yml", ] fuzzer = ByteArrayFuzzer() fuzzer.cut_propability = 0.01 diff --git a/test/test_program.py b/tests/test_program.py similarity index 91% rename from test/test_program.py rename to tests/test_program.py index 263804a..c3938af 100644 --- a/test/test_program.py +++ b/tests/test_program.py @@ -57,7 +57,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc89(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC89 protocol""" - self._program_yml("./test/stc89c52rc.yml", serial_mock, read_mock) + self._program_yml("./tests/stc89c52rc.yml", serial_mock, read_mock) @patch("stcgal.protocols.StcBaseProtocol.read_packet") @patch("stcgal.protocols.Stc89Protocol.write_packet") @@ -66,7 +66,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc12(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC12 protocol""" - self._program_yml("./test/stc12c5a60s2.yml", serial_mock, read_mock) + self._program_yml("./tests/stc12c5a60s2.yml", serial_mock, read_mock) @patch("stcgal.protocols.StcBaseProtocol.read_packet") @patch("stcgal.protocols.Stc89Protocol.write_packet") @@ -75,7 +75,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc12a(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC12A protocol""" - self._program_yml("./test/stc12c2052ad.yml", serial_mock, read_mock) + self._program_yml("./tests/stc12c2052ad.yml", serial_mock, read_mock) def test_program_stc12b(self): """Test a programming cycle with STC12B protocol""" @@ -88,7 +88,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc15f2(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC15 protocol, F2 series""" - self._program_yml("./test/iap15f2k61s2.yml", serial_mock, read_mock) + self._program_yml("./tests/iap15f2k61s2.yml", serial_mock, read_mock) @patch("stcgal.protocols.StcBaseProtocol.read_packet") @patch("stcgal.protocols.Stc89Protocol.write_packet") @@ -97,7 +97,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc15w4(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC15 protocol, W4 series""" - self._program_yml("./test/stc15w4k56s4.yml", serial_mock, read_mock) + self._program_yml("./tests/stc15w4k56s4.yml", serial_mock, read_mock) @unittest.skip("trace is broken") @patch("stcgal.protocols.StcBaseProtocol.read_packet") @@ -107,7 +107,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc15a(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC15A protocol""" - self._program_yml("./test/stc15f104e.yml", serial_mock, read_mock) + self._program_yml("./tests/stc15f104e.yml", serial_mock, read_mock) @patch("stcgal.protocols.StcBaseProtocol.read_packet") @patch("stcgal.protocols.Stc89Protocol.write_packet") @@ -116,7 +116,7 @@ class ProgramTests(unittest.TestCase): @patch("sys.stdout") def test_program_stc15l1(self, out, sleep_mock, serial_mock, write_mock, read_mock): """Test a programming cycle with STC15 protocol, L1 series""" - self._program_yml("./test/stc15l104w.yml", serial_mock, read_mock) + self._program_yml("./tests/stc15l104w.yml", serial_mock, read_mock) def test_program_stc15w4_usb(self): """Test a programming cycle with STC15W4 USB protocol""" diff --git a/test/test_utils.py b/tests/test_utils.py similarity index 100% rename from test/test_utils.py rename to tests/test_utils.py