Skip to content

Commit 7c13bb3

Browse files
authored
Update coderbot_test.py fix
1 parent f65bc87 commit 7c13bb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/coderbot_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class CoderBotServoMotorTestCase(unittest.TestCase):
4545
def setUp(self):
4646
coderbot.pigpio.pi = test.pigpio_mock.PIGPIOMock
4747
coderbot.CoderBot._instance = None
48-
self.bot = coderbot.CoderBot.get_instance(servo=True)
48+
settings = config.Config.read().get('settings')
49+
self.bot = coderbot.CoderBot.get_instance(settings, Servo=True)
4950

5051
def test_motor_forward(self):
5152
self.bot.forward(speed=100, elapse=0.1)
@@ -72,7 +73,8 @@ class CoderBotSonarTestCase(unittest.TestCase):
7273
def setUp(self):
7374
coderbot.pigpio.pi = test.pigpio_mock.PIGPIOMock
7475
coderbot.CoderBot._instance = None
75-
self.bot = coderbot.CoderBot.get_instance()
76+
settings = config.Config.read().get('settings')
77+
self.bot = coderbot.CoderBot.get_instance(settings)
7678

7779
def test_sonar(self):
7880
for i in range(0, 3):

0 commit comments

Comments
 (0)