diff options
-rw-r--r-- | launcher.py | 19 | ||||
-rw-r--r-- | test_import_variable.py | 30 | ||||
-rw-r--r-- | test_import_variable.r (renamed from source_file.r) | 0 |
3 files changed, 30 insertions, 19 deletions
diff --git a/launcher.py b/launcher.py deleted file mode 100644 index 50aaedc..0000000 --- a/launcher.py +++ /dev/null @@ -1,19 +0,0 @@ -import dialoguer - -src_fil_r = dialoguer.Dialogue('source_file.r') -print('active:', src_fil_r.active) -src_fil_r.open() -print('active:', src_fil_r.active) - -msg_1 = src_fil_r.import_variable('msg_1') -print(msg_1) - -msg_2 = src_fil_r.import_variable('msg_2') -print(msg_2) - -print('active:', src_fil_r.active) -src_fil_r.close() -print('active:', src_fil_r.active) - -print("end launcher") - diff --git a/test_import_variable.py b/test_import_variable.py new file mode 100644 index 0000000..c718e92 --- /dev/null +++ b/test_import_variable.py @@ -0,0 +1,30 @@ +import unittest +import dialoguer + + +class TestEmployee(unittest.TestCase): + + @classmethod + def setUpClass(cls): + pass + + @classmethod + def tearDownClass(cls): + pass + + def setUp(self): + self.src_fil_r = dialoguer.Dialogue('test_import_variable.r') + self.src_fil_r.open() + + def tearDown(self): + self.src_fil_r.close() + + def test_import_variable(self): + msg_1 = self.src_fil_r.import_variable('msg_1') + msg_2 = self.src_fil_r.import_variable('msg_2') + self.assertEqual(msg_1, b'Initializing Client - R') + self.assertEqual(msg_2, b'Initialized Client - R') + + +if __name__ == '__main__': + unittest.main() diff --git a/source_file.r b/test_import_variable.r index 3d13503..3d13503 100644 --- a/source_file.r +++ b/test_import_variable.r |