diff options
author | TinWoodman92 <chrhodgden@gmail.com> | 2023-06-11 21:04:42 -0500 |
---|---|---|
committer | TinWoodman92 <chrhodgden@gmail.com> | 2023-06-11 21:04:42 -0500 |
commit | 3527e1a22e559f8a3d6e87bb2d24adb6ae2c64a4 (patch) | |
tree | 1ac106f359141306d1c694a210523964f2a4f936 | |
parent | 5e2e0b99ca28f10498df62bf2c1da1360437172e (diff) |
Migrated use-case launcher.py to test-case test_import_variable.py. R file renamed accordingly.
-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 |