-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing the scope command message test
- Loading branch information
1 parent
5e30bf0
commit f712979
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |