Public Access
fix return-value/deprecated API bugs, accumulation lock leaks, code cleanup
- raise instead of silent None for unsupported operands and empty negation - validate before acquiring lock in Accumulation operators (no RLock leak) - Accumulation._copy_provenance helper, ADC_Result._copy_metadata for all result paths - shared _sandbox_stdout_redirect contextmanager for sandboxed scripts - TemperatureMonitor dead code removal (gtk helper, traceback, unused properties) - new unit tests incl. lock-freedom regression test - gitignore sphinx generated doc/_autosummary/ and doc/damaris/
This commit is contained in:
1 parent
91ade4376c
commit
f9d8de7697
26 files changed
+590
-236
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import unittest
|
||||
|
||||
from damaris.data.Config_Result import Config_Result
|
||||
|
||||
|
||||
class TestConfigResult(unittest.TestCase):
|
||||
def test_constructor_with_no_arguments(self):
|
||||
"""Test initializer with no arguments."""
|
||||
cr = Config_Result()
|
||||
self.assertEqual(cr.get_config_dictionary(), {})
|
||||
self.assertEqual(cr.description, {})
|
||||
|
||||
def test_constructor_with_arguments(self):
|
||||
"""Test initializer with config and description arguments."""
|
||||
config = {"a": 1}
|
||||
desc = {"b": 2}
|
||||
cr = Config_Result(config=config, desc=desc)
|
||||
self.assertEqual(cr.get_config_dictionary(), config)
|
||||
self.assertEqual(cr.description, desc)
|
||||
|
||||
def test_get_set_config(self):
|
||||
cr = Config_Result()
|
||||
cr.set_config("key", "value")
|
||||
self.assertEqual(cr.get_config("key"), "value")
|
||||
self.assertIsNone(cr.get_config("missing"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user