From 5ac217f518ee471c9599c75b836afea1bd92b064 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 18 Feb 2022 16:43:50 -0600 Subject: Fix the tests so they actually work Signed-off-by: Matt Strapp --- System/Tests/donovanTestScript.py | 14 ++------------ System/Tests/errorTestScript.py | 5 +---- System/Tests/samTestScript.py | 5 +---- System/Tests/system_swingup_test.py | 2 +- System/Tests/system_swingup_test_2.py | 8 +------- System/Tests/test_Encoder.py | 2 +- System/Tests/test_Motor.py | 2 +- System/Tests/test_Return_Home.py | 2 +- 8 files changed, 9 insertions(+), 31 deletions(-) (limited to 'System/Tests') diff --git a/System/Tests/donovanTestScript.py b/System/Tests/donovanTestScript.py index 4a51f08..61da1f1 100644 --- a/System/Tests/donovanTestScript.py +++ b/System/Tests/donovanTestScript.py @@ -1,19 +1,9 @@ - - - - - -import sys -sys.path.insert(0, '/home/pi/pendulum/System') -from System.system import System +from pendulum import System import time from sys import exit #import pandas +from pendulum import Encoder - -### -sys.path.insert(0, '/home/pi/pendulum/System') -from encoder import Encoder import RPi.GPIO as GPIO diff --git a/System/Tests/errorTestScript.py b/System/Tests/errorTestScript.py index 5f9312f..86e95bf 100644 --- a/System/Tests/errorTestScript.py +++ b/System/Tests/errorTestScript.py @@ -1,7 +1,4 @@ - -import sys -sys.path.insert(0, '/home/pi/pendulum/System') -from System.system import System +from pendulum import System import time from sys import exit #import pandas diff --git a/System/Tests/samTestScript.py b/System/Tests/samTestScript.py index 5f9312f..86e95bf 100644 --- a/System/Tests/samTestScript.py +++ b/System/Tests/samTestScript.py @@ -1,7 +1,4 @@ - -import sys -sys.path.insert(0, '/home/pi/pendulum/System') -from System.system import System +from pendulum import System import time from sys import exit #import pandas diff --git a/System/Tests/system_swingup_test.py b/System/Tests/system_swingup_test.py index e13c7ca..15063d7 100644 --- a/System/Tests/system_swingup_test.py +++ b/System/Tests/system_swingup_test.py @@ -6,7 +6,7 @@ import math from gym import spaces, logger from gym.utils import seeding -from system import System +from pendulum import System import time from sys import exit diff --git a/System/Tests/system_swingup_test_2.py b/System/Tests/system_swingup_test_2.py index fc02ed6..e1af923 100644 --- a/System/Tests/system_swingup_test_2.py +++ b/System/Tests/system_swingup_test_2.py @@ -6,13 +6,7 @@ import math from gym import spaces, logger from gym.utils import seeding -### -import sys -sys.path.insert(0, '/home/pi/pendulum/System') -### - - -from System.system import System +from pendulum import System #from . import System import time from sys import exit diff --git a/System/Tests/test_Encoder.py b/System/Tests/test_Encoder.py index bb6e3e4..fa1c91c 100644 --- a/System/Tests/test_Encoder.py +++ b/System/Tests/test_Encoder.py @@ -1,4 +1,4 @@ -from encoder import Encoder +from pendulum import Encoder import time import RPi.GPIO as GPIO diff --git a/System/Tests/test_Motor.py b/System/Tests/test_Motor.py index f48b6ee..c4e777a 100644 --- a/System/Tests/test_Motor.py +++ b/System/Tests/test_Motor.py @@ -1,4 +1,4 @@ -from motor import Motor +from pendulum import Motor import time import RPi.GPIO as GPIO diff --git a/System/Tests/test_Return_Home.py b/System/Tests/test_Return_Home.py index 04e19cb..9f45925 100644 --- a/System/Tests/test_Return_Home.py +++ b/System/Tests/test_Return_Home.py @@ -1,4 +1,4 @@ -from system import System +from pendulum import System from time import sleep # Main program -- cgit v1.2.3