bts_nanobts: Fix pwsup_list increasing its size every new test
variables under class section are shared among all instances, and are
used unless the specific class instance attribute is set. As a result,
the same pwsup_list object was being re-used.
Take the chance to do the same with the _pcu var, since we want same
behavior for it.
See for reference: https://stackoverflow.com/a/1716730
Fixes: OS#3456
Change-Id: I3f6a9d64b35aec33430e90872f41c3d046653ce6
diff --git a/src/osmo_gsm_tester/bts_nanobts.py b/src/osmo_gsm_tester/bts_nanobts.py
index 7f0151f..a18f205 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -28,13 +28,13 @@
class NanoBts(bts.Bts):
- pwsup_list = []
- _pcu = None
##############
# PROTECTED
##############
def __init__(self, suite_run, conf):
super().__init__(suite_run, conf, 'nanobts_%s' % conf.get('label', 'nolabel'), 'nanobts')
+ self.pwsup_list = []
+ self._pcu = None
def _configure(self):
if self.bsc is None: