Skip to content

Commit

Permalink
fixing the scope command message test
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronDevine committed May 7, 2024
1 parent 5e30bf0 commit f712979
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/test_scope_command.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
from TEM_comms.msgs.scope import command
from TEM_comms.msgs.scope import Command
from pydantic import ValidationError
import pytest

def test_mag():
with pytest.raises(ValidationError):
command(mag_mode="LM")
Command(mag_mode="LM")

with pytest.raises(ValidationError):
command(mag=10)
Command(mag=10)

command()
command(mag_mode="LM", mag=1)
Command()
Command(mag_mode="LM", mag=1)

def test_mag_mode():
with pytest.raises(ValidationError):
command(mag_mode="test", mag=1)
Command(mag_mode="test", mag=1)

command(mag_mode="LM", mag=1)
command(mag_mode="MAG2", mag=1)
command(mag_mode="MAG2", mag=1)
Command(mag_mode="LM", mag=1)
Command(mag_mode="MAG2", mag=1)
Command(mag_mode="MAG2", mag=1)

0 comments on commit f712979

Please sign in to comment.