1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 18:12:20 +00:00

Added Model string representation

This should help with performance issues with models that have large
private variables.
This commit is contained in:
J. Fernando Sánchez
2017-02-02 04:46:35 +01:00
parent ceed9b97d0
commit b072121e20
3 changed files with 17 additions and 2 deletions

View File

@@ -100,5 +100,16 @@ class ModelsTest(TestCase):
logging.debug(c)
p.validate()
def test_str(self):
"""The string representation shouldn't include private variables"""
r = Results()
p = SenpyPlugin({"name": "STR test", "version": 0})
p._testing = 0
s = str(p)
assert "_testing" not in s
r.analysis.append(p)
s = str(r)
assert "_testing" not in s
def test_frame_response(self):
pass