First round of clean-ups of imports and unused variables

Run pyflakes src/osmo_gsm_tester and then address the first
round of problems.

Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
This commit is contained in:
Holger Hans Peter Freyther 2018-09-23 18:06:48 +01:00 committed by Holger Freyther
parent a52855614a
commit d03acdf38a
11 changed files with 11 additions and 25 deletions

View File

@ -17,12 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import pprint
import tempfile
import copy
from abc import ABCMeta, abstractmethod
from . import log, config, util, template, process, schema, pcu_osmo
from . import log, config, schema
class Bts(log.Origin, metaclass=ABCMeta):

View File

@ -18,11 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import pprint
import tempfile
import re
from abc import ABCMeta, abstractmethod
from . import log, config, util, template, process, pcap_recorder, bts, pcu
from . import log, config, util, process, pcap_recorder, bts, pcu
from . import powersupply
from .event_loop import MainLoop

View File

@ -19,8 +19,7 @@
import os
import pprint
import tempfile
from . import log, config, util, template, process, pcu_osmo, bts_osmo
from . import log, config, util, template, process, bts_osmo
class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit):

View File

@ -18,10 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import pprint
import tempfile
from abc import ABCMeta, abstractmethod
from . import log, config, util, template, process, bts, pcu_osmo
from . import log, bts, pcu_osmo
class OsmoBts(bts.Bts, metaclass=ABCMeta):

View File

@ -20,9 +20,8 @@
import os
import stat
import pprint
import tempfile
from abc import ABCMeta, abstractmethod
from . import log, config, util, template, process, pcu_osmo, bts_osmo
from . import log, config, util, template, process, bts_osmo
from .event_loop import MainLoop
class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit):

View File

@ -23,7 +23,7 @@ import smpplib.command
import smpplib.consts
import smpplib.exceptions
from . import log, util, sms
from . import log
from .event_loop import MainLoop
# if you want to know what's happening inside python-smpplib

View File

@ -21,9 +21,6 @@ from . import log, util, sms
from .event_loop import MainLoop
from pydbus import SystemBus, Variant
import time
import pprint
import sys
# Required for Gio.Cancellable.
# See https://lazka.github.io/pgi-docs/Gio-2.0/classes/Cancellable.html#Gio.Cancellable

View File

@ -19,8 +19,7 @@
import os
import pprint
import tempfile
from . import log, config, util, template, process, pcu
from . import config, util, template, process, pcu
class OsmoPcu(pcu.Pcu):

View File

@ -17,11 +17,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import math
from datetime import datetime
import xml.etree.ElementTree as et
from . import log, suite, test
from . import test
def trial_to_junit_write(trial, junit_path):
elements = et.ElementTree(element=trial_to_junit(trial))
@ -53,7 +52,7 @@ def test_to_junit(t):
testcase.set('name', t.name())
testcase.set('time', str(math.ceil(t.duration)))
if t.status == test.Test.SKIP:
skip = et.SubElement(testcase, 'skipped')
et.SubElement(testcase, 'skipped')
elif t.status == test.Test.FAIL:
failure = et.SubElement(testcase, 'failure')
failure.set('type', t.fail_type or 'failure')

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import log, config, util, template, process
from . import log, config
class Smsc:

View File

@ -21,7 +21,7 @@ import os
import sys
import time
import pprint
from . import config, log, template, util, resource, schema, test
from . import config, log, util, resource, test
from .event_loop import MainLoop
from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, modem, esme, osmocon