Skip to content

Commit

Permalink
Changed a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander James Wallar committed Feb 7, 2014
1 parent b2265ce commit 5fc4bfd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion locaudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def run(host, port, config_filename):

global triangulation, detectionserver, fingerprint

import triangulation
import localization
import detectionserver
import fingerprint

Expand Down
2 changes: 1 addition & 1 deletion locaudio/detectionserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from point import Point
import config
import json
import triangulation as tri
import localization as tri
import fingerprint
import plot
import db
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion locaudio/plot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import triangulation as tri
import localization as tri
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
Expand Down
12 changes: 10 additions & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,19 @@

class ServerTest(unittest.TestCase):

def test_server_notify(self):
def test_server_notify_added(self):
for d_dict in d_dicts:
ret_dict = loc.notify_event(d_dict)

print "\n=== Server Notify === :: {0}\n".format(ret_dict)
print "\n=== Server Notify Added === :: {0}\n".format(ret_dict)


def test_server_notify_not_added(self):
for d_dict in d_dicts:
d_dict["fingerprint"] = [1, 2, 3, 4]
ret_dict = loc.notify_event(d_dict)

print "\n=== Server Notify Not Added === :: {0}\n".format(ret_dict)


def test_server_triangulation(self):
Expand Down
8 changes: 4 additions & 4 deletions tests/test_triangulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))

import locaudio.triangulation as tri
import locaudio.localization as tri
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
Expand All @@ -30,7 +30,7 @@ def setUp(self):

def test_position_probability(self):

l_ref = 100
l_ref = 65
r_ref = 1

test_x = 0
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_optimization_list(self):

def test_optimization(self):

l_ref = 100
l_ref = 65
r_ref = 1

res = tri.determine_sound_locations(
Expand All @@ -78,7 +78,7 @@ def test_optimization(self):
def test_together(self):

r_ref = 1
l_ref = 100
l_ref = 65

res = tri.determine_sound_locations(
r_ref, l_ref,
Expand Down

0 comments on commit 5fc4bfd

Please sign in to comment.