aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTinWoodman92 <chrhodgden@gmail.com>2023-07-07 19:25:39 -0500
committerTinWoodman92 <chrhodgden@gmail.com>2023-07-07 19:25:39 -0500
commitf6bbfe5bcdbe2a29a8180e3d3fdaa55cddbc8f99 (patch)
treed6a3aa85c53397c7a801f6b37533d1382912406a /tests
parent5753265e7ba136fdba10ca8ea384837a18179de6 (diff)
Added save environment test.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_save_environment.py26
-rw-r--r--tests/test_save_environment.r1
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_save_environment.py b/tests/test_save_environment.py
new file mode 100644
index 0000000..de8baa3
--- /dev/null
+++ b/tests/test_save_environment.py
@@ -0,0 +1,26 @@
+import unittest
+import dialoguer
+
+
+class TestSaveEnvironment(unittest.TestCase):
+
+ # @classmethod
+ # def setUpClass(cls):
+ # source_file_path = __file__.replace('.py', '.r')
+ # cls.src_fil_r = dialoguer.Dialogue(source_file_path)
+
+ # @classmethod
+ # def tearDownClass(cls):
+ # cls.src_fil_r.close()
+
+ def setUp(self):
+ source_file_path = __file__.replace('.py', '.r')
+ self.src_fil_r = dialoguer.Dialogue(source_file_path)
+
+ def tearDown(self):
+ self.src_fil_r.close()
+
+ def test_save_environment(self):
+ str_1 = 'Test string 1'
+ self.src_fil_r.assign_variable('str_1', str_1)
+ str_ret_1 = self.src_fil_r.save_environment()
diff --git a/tests/test_save_environment.r b/tests/test_save_environment.r
new file mode 100644
index 0000000..70f37b2
--- /dev/null
+++ b/tests/test_save_environment.r
@@ -0,0 +1 @@
+chk_0 <- TRUE