From aab254b6e412f3a64bf46bc5032a601f8b9b38c8 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Wed, 9 Jun 2021 11:43:05 +0000
Subject: [PATCH] Add test folder files and __init__ support files

---
 devices/__init__.py          | 10 +++++++---
 devices/test/__init__.py     |  0
 devices/test/base.py         | 24 ++++++++++++++++++++++++
 devices/test/sdp/__init__.py |  0
 devices/test/sdp/test_sdp.py | 21 +++++++++++++++++++++
 5 files changed, 52 insertions(+), 3 deletions(-)
 create mode 100644 devices/test/__init__.py
 create mode 100644 devices/test/base.py
 create mode 100644 devices/test/sdp/__init__.py
 create mode 100644 devices/test/sdp/test_sdp.py

diff --git a/devices/__init__.py b/devices/__init__.py
index e44e9d156..efefae1d5 100644
--- a/devices/__init__.py
+++ b/devices/__init__.py
@@ -1,3 +1,7 @@
-from ._version import get_versions
-__version__ = get_versions()['version']
-del get_versions
+import pbr.version
+
+__version__ = pbr.version.VersionInfo(
+    'TangoStationControl').version_string()
+# from ._version import get_versions
+# __version__ = get_versions()['version']
+# del get_versions
diff --git a/devices/test/__init__.py b/devices/test/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/devices/test/base.py b/devices/test/base.py
new file mode 100644
index 000000000..c3335dad5
--- /dev/null
+++ b/devices/test/base.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of the PCC project
+#
+#
+#
+# Distributed under the terms of the APACHE license.
+# See LICENSE.txt for more info.
+
+import testscenarios
+
+
+class BaseTestCase(testscenarios.WithScenarios):
+    """Test base class."""
+
+    def setUp(self):
+        super().setUp()
+
+
+class TestCase(BaseTestCase):
+    """Test case base class for all unit tests."""
+
+    def setUp(self):
+        super().setUp()
diff --git a/devices/test/sdp/__init__.py b/devices/test/sdp/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/devices/test/sdp/test_sdp.py b/devices/test/sdp/test_sdp.py
new file mode 100644
index 000000000..5929acc09
--- /dev/null
+++ b/devices/test/sdp/test_sdp.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+#
+# This file is part of the PCC project
+#
+#
+#
+# Distributed under the terms of the APACHE license.
+# See LICENSE.txt for more info.
+
+from devices.SDP import SDP
+
+from devices.test import base
+
+
+class TestSDP(base.TestCase):
+
+    def setUp(self):
+        super(TestSDP, self).setUp()
+
+    def test_example(self):
+        self.assertEqual(5, 5)
-- 
GitLab