Skip to content

Commit 3af7a3a

Browse files
committed
Added TPS1100 tests and small corrections
1 parent be2a540 commit 3af7a3a

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

src/geocompy/data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
- ``Vector``
2626
- ``Coordinate``
2727
28+
Enums
29+
-----
30+
2831
- ``ADJUST``
2932
- ``ATR``
3033
- ``ATRMODE``

tests/test_tps1000.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def tps() -> TPS1000:
1414
return TPS1000(DummyGeoComConnection())
1515

1616

17-
class TestTPS1200P:
17+
class TestTPS1000:
1818
def test_init(self):
1919
conn_bad = Connection()
2020
with pytest.raises(ConnectionError):

tests/test_tps1100.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import pytest
2+
3+
from geocompy.communication import Connection
4+
from geocompy.tps1100 import TPS1100
5+
6+
from helpers_geocom import (
7+
DummyGeoComConnection,
8+
GeoComTester
9+
)
10+
11+
12+
@pytest.fixture
13+
def tps() -> TPS1100:
14+
return TPS1100(DummyGeoComConnection())
15+
16+
17+
class TestTPS1100:
18+
def test_init(self):
19+
conn_bad = Connection()
20+
with pytest.raises(ConnectionError):
21+
TPS1100(conn_bad, retry=1)
22+
23+
conn_good = DummyGeoComConnection()
24+
instrument = TPS1100(conn_good)
25+
assert instrument._precision == 15
26+
27+
def test_parse_response(self, tps: TPS1100):
28+
GeoComTester.test_parse_response(tps)
29+
30+
def test_request(self, tps: TPS1100):
31+
GeoComTester.test_request(tps)

0 commit comments

Comments
 (0)