@@ -21,21 +21,21 @@ class A(Enum):
2121
2222
2323class TestFunctions :
24- def test_toenum (self ):
24+ def test_toenum (self ) -> None :
2525 assert toenum (A , "MEMBER" ) is A .MEMBER
2626 assert toenum (A , A .MEMBER ) is A .MEMBER
2727
28- def test_enumparser (self ):
28+ def test_enumparser (self ) -> None :
2929 assert callable (enumparser (A ))
3030 assert enumparser (A )("1" ) is A .MEMBER
3131
32- def test_parsestr (self ):
32+ def test_parsestr (self ) -> None :
3333 assert parsestr ("value" ) == "value"
3434 assert parsestr ("\" value" ) == "\" value"
3535 assert parsestr ("value\" " ) == "value\" "
3636 assert parsestr ("\" value\" " ) == "value"
3737
38- def test_gsiword (self ):
38+ def test_gsiword (self ) -> None :
3939 assert gsiword (11 , "1" ) == "11....+00000001 "
4040 assert gsiword (11 , "1" , gsi16 = True ) == "*11....+0000000000000001 "
4141 assert gsiword (
@@ -47,7 +47,7 @@ def test_gsiword(self):
4747
4848
4949class TestAngle :
50- def test_init (self ):
50+ def test_init (self ) -> None :
5151 assert float (Angle (1 )) == approx (float (Angle (1 , AngleUnit .RAD )))
5252
5353 units = AngleUnit ._member_names_ .copy ()
@@ -60,12 +60,12 @@ def test_init(self):
6060 == approx (float (Angle (1 , unit )))
6161 )
6262
63- def test_asunit (self ):
63+ def test_asunit (self ) -> None :
6464 value = Angle (180 , 'DEG' )
6565 assert value .asunit ('DEG' ) == approx (180 )
6666 assert value .asunit () == value .asunit ('RAD' )
6767
68- def test_normalize (self ):
68+ def test_normalize (self ) -> None :
6969 assert (
7070 Angle (
7171 370 ,
@@ -98,7 +98,7 @@ def test_normalize(self):
9898 == approx (Angle (370 , 'DEG' ).normalized ().asunit ('DEG' ))
9999 )
100100
101- def test_arithmetic (self ):
101+ def test_arithmetic (self ) -> None :
102102 a1 = Angle (90 , 'DEG' )
103103 a2 = Angle (90 , 'DEG' )
104104 assert (
@@ -125,21 +125,21 @@ def test_arithmetic(self):
125125
126126
127127class TestByte :
128- def test_init (self ):
128+ def test_init (self ) -> None :
129129 with pytest .raises (ValueError ):
130130 Byte (- 1 )
131131
132132 with pytest .raises (ValueError ):
133133 Byte (256 )
134134
135- def test_str (self ):
135+ def test_str (self ) -> None :
136136 value = Byte (12 )
137137 assert int (value ) == 12
138138 assert str (value ) == "'0C'"
139139
140140
141141class TestCoordinate :
142- def test_init (self ):
142+ def test_init (self ) -> None :
143143 value = Coordinate (1 , 2 , 3 )
144144 assert value .x == 1
145145 assert value .y == 2
@@ -148,7 +148,7 @@ def test_init(self):
148148 x , _ , _ = value
149149 assert x == value .x
150150
151- def test_arithmetic (self ):
151+ def test_arithmetic (self ) -> None :
152152 c1 = Coordinate (1 , 1 , 1 )
153153 c2 = Coordinate (1 , 2 , 3 )
154154
@@ -158,7 +158,7 @@ def test_arithmetic(self):
158158 c3 = + c1
159159 assert c3 is not c1
160160
161- def test_polar (self ):
161+ def test_polar (self ) -> None :
162162 c1 = Coordinate (- 1 , - 1 , - 1 )
163163 p1 = c1 .to_polar ()
164164
0 commit comments