Skip to content

Commit

Permalink
Fix minor test problems highlighted by codacy.com.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Apr 9, 2016
1 parent 6a9382d commit 07b21f0
Show file tree
Hide file tree
Showing 99 changed files with 32 additions and 302 deletions.
8 changes: 2 additions & 6 deletions misc/currentcost/gnome-panel/CurrentCostMQTT.py
@@ -1,12 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python


import gnomeapplet import gnomeapplet
import gobject
import gtk import gtk
import mosquitto import mosquitto
import os
import platform
import pygtk
import sys import sys


class CurrentCostMQTT(gnomeapplet.Applet): class CurrentCostMQTT(gnomeapplet.Applet):
Expand All @@ -30,7 +26,7 @@ def on_change_background(self, applet, type, color, pixmap):


def show_menu(self, widget, event): def show_menu(self, widget, event):
print "menu" print "menu"

def __init__(self, applet, iid): def __init__(self, applet, iid):
self.applet = applet self.applet = applet
self.label = gtk.Label("0W") self.label = gtk.Label("0W")
Expand Down Expand Up @@ -63,7 +59,7 @@ def CurrentCostMQTT_factory(applet, iid):
main_window.show_all() main_window.show_all()
gtk.main() gtk.main()
sys.exit() sys.exit()

if __name__ == '__main__': if __name__ == '__main__':
gnomeapplet.bonobo_factory("OAFIID:CurrentCostMQTT_Factory", gnomeapplet.Applet.__gtype__, "MQTT", "0", CurrentCostMQTT_factory) gnomeapplet.bonobo_factory("OAFIID:CurrentCostMQTT_Factory", gnomeapplet.Applet.__gtype__, "MQTT", "0", CurrentCostMQTT_factory)


4 changes: 0 additions & 4 deletions test/broker/01-connect-anon-denied.py
Expand Up @@ -2,10 +2,6 @@


# Test whether an anonymous connection is correctly denied. # Test whether an anonymous connection is correctly denied.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-invalid-id-0-311.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a CONNECT with a zero length client id results in the correct CONNACK packet. # Test whether a CONNECT with a zero length client id results in the correct CONNACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-invalid-id-0.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a CONNECT with a zero length client id results in the correct CONNACK packet. # Test whether a CONNECT with a zero length client id results in the correct CONNACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-invalid-id-missing.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a CONNECT with a zero length client id results in the correct CONNACK packet. # Test whether a CONNECT with a zero length client id results in the correct CONNACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-invalid-protonum.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a CONNECT with an invalid protocol number results in the correct CONNACK packet. # Test whether a CONNECT with an invalid protocol number results in the correct CONNACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
5 changes: 0 additions & 5 deletions test/broker/01-connect-success.py
Expand Up @@ -3,11 +3,6 @@
# Test whether a valid CONNECT results in the correct CONNACK packet. # Test whether a valid CONNECT results in the correct CONNACK packet.


import inspect, os, sys import inspect, os, sys
import os
import subprocess
import socket
import sys
import time


# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-uname-no-password-denied.py
Expand Up @@ -3,10 +3,6 @@
# Test whether a connection is denied if it provides just a username when it # Test whether a connection is denied if it provides just a username when it
# needs a username and password. # needs a username and password.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
2 changes: 0 additions & 2 deletions test/broker/01-connect-uname-password-denied.py
Expand Up @@ -4,8 +4,6 @@
# incorrect password. # incorrect password.


import subprocess import subprocess
import socket
import time


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-uname-password-success-no-tls.py
Expand Up @@ -3,10 +3,6 @@
# Test whether a connection is denied if it provides a correct username but # Test whether a connection is denied if it provides a correct username but
# incorrect password. # incorrect password.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/01-connect-uname-password-success.py
Expand Up @@ -3,10 +3,6 @@
# Test whether a connection is denied if it provides a correct username but # Test whether a connection is denied if it provides a correct username but
# incorrect password. # incorrect password.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/02-subpub-qos0.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a client subscribed to a topic receives its own message sent to that topic. # Test whether a client subscribed to a topic receives its own message sent to that topic.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
2 changes: 0 additions & 2 deletions test/broker/02-subpub-qos1.py
Expand Up @@ -2,9 +2,7 @@


# Test whether a client subscribed to a topic receives its own message sent to that topic. # Test whether a client subscribed to a topic receives its own message sent to that topic.


import subprocess
import socket import socket
import time


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
4 changes: 0 additions & 4 deletions test/broker/02-subpub-qos2.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a client subscribed to a topic receives its own message sent to that topic. # Test whether a client subscribed to a topic receives its own message sent to that topic.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
3 changes: 0 additions & 3 deletions test/broker/02-subscribe-qos0.py
Expand Up @@ -2,10 +2,7 @@


# Test whether a SUBSCRIBE to a topic with QoS 0 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 0 results in the correct SUBACK packet.


import subprocess
import socket
import time import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/02-subscribe-qos1.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a SUBSCRIBE to a topic with QoS 1 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 1 results in the correct SUBACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/02-subscribe-qos2.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/02-unsubscribe-qos0.py
Expand Up @@ -3,10 +3,6 @@
# Test whether a UNSUBSCRIBE to a topic with QoS 0 results in the correct UNSUBACK packet. # Test whether a UNSUBSCRIBE to a topic with QoS 0 results in the correct UNSUBACK packet.
# This doesn't assume a subscription exists. # This doesn't assume a subscription exists.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
2 changes: 0 additions & 2 deletions test/broker/02-unsubscribe-qos1.py
Expand Up @@ -3,8 +3,6 @@
# Test whether a SUBSCRIBE to a topic with QoS 1 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 1 results in the correct SUBACK packet.


import subprocess import subprocess
import socket
import time


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
2 changes: 0 additions & 2 deletions test/broker/02-unsubscribe-qos2.py
Expand Up @@ -3,8 +3,6 @@
# Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet.


import subprocess import subprocess
import socket
import time


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
6 changes: 1 addition & 5 deletions test/broker/03-pattern-matching-helper.py
@@ -1,9 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand All @@ -23,6 +19,6 @@
sock.send(publish_packet) sock.send(publish_packet)
rc = 0 rc = 0
sock.close() sock.close()

exit(rc) exit(rc)


1 change: 0 additions & 1 deletion test/broker/03-pattern-matching.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python


import subprocess import subprocess
import socket
import time import time


import inspect, os, sys import inspect, os, sys
Expand Down
4 changes: 0 additions & 4 deletions test/broker/03-publish-b2c-disconnect-qos1-helper.py
@@ -1,9 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
2 changes: 0 additions & 2 deletions test/broker/03-publish-b2c-disconnect-qos1.py
Expand Up @@ -2,8 +2,6 @@


import subprocess import subprocess
import socket import socket
import time
from os import environ


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
4 changes: 0 additions & 4 deletions test/broker/03-publish-b2c-disconnect-qos2-helper.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow. # Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
3 changes: 0 additions & 3 deletions test/broker/03-publish-b2c-disconnect-qos2.py
@@ -1,9 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python


import subprocess import subprocess
import socket
import time
from os import environ


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
6 changes: 1 addition & 5 deletions test/broker/03-publish-b2c-timeout-qos1-helper.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow. # Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand All @@ -30,6 +26,6 @@
rc = 0 rc = 0


sock.close() sock.close()

exit(rc) exit(rc)


3 changes: 0 additions & 3 deletions test/broker/03-publish-b2c-timeout-qos1.py
Expand Up @@ -3,9 +3,6 @@
# Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet.


import subprocess import subprocess
import socket
import time
from os import environ


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
4 changes: 0 additions & 4 deletions test/broker/03-publish-b2c-timeout-qos2-helper.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow. # Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
3 changes: 0 additions & 3 deletions test/broker/03-publish-b2c-timeout-qos2.py
Expand Up @@ -3,9 +3,6 @@
# Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet. # Test whether a SUBSCRIBE to a topic with QoS 2 results in the correct SUBACK packet.


import subprocess import subprocess
import socket
import time
from os import environ


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down
5 changes: 0 additions & 5 deletions test/broker/03-publish-c2b-disconnect-qos2.py
@@ -1,10 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python


import subprocess
import socket
import time
from os import environ

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/03-publish-c2b-timeout-qos2.py
Expand Up @@ -4,10 +4,6 @@
# flow. This test introduces delays into the flow in order to force the broker # flow. This test introduces delays into the flow in order to force the broker
# to send duplicate PUBREC and PUBCOMP messages. # to send duplicate PUBREC and PUBCOMP messages.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
4 changes: 0 additions & 4 deletions test/broker/03-publish-qos1.py
Expand Up @@ -2,10 +2,6 @@


# Test whether a PUBLISH to a topic with QoS 1 results in the correct PUBACK packet. # Test whether a PUBLISH to a topic with QoS 1 results in the correct PUBACK packet.


import subprocess
import socket
import time

import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
Expand Down
2 changes: 0 additions & 2 deletions test/broker/03-publish-qos2.py
Expand Up @@ -3,8 +3,6 @@
# Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow. # Test whether a PUBLISH to a topic with QoS 2 results in the correct packet flow.


import subprocess import subprocess
import socket
import time


import inspect, os, sys import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
Expand Down

0 comments on commit 07b21f0

Please sign in to comment.