Skip to content

Commit a7b777a

Browse files
committed
Remove duplicate write_state()
1 parent 73f70b2 commit a7b777a

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

singer/bookmarks.py

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
LOGGER = get_logger()
88

99

10-
def write_state(state):
11-
json.dump(state.to_dict(), sys.stdout, indent=2)
12-
13-
1410
class State:
1511
def __init__(
1612
self, bookmarks: Optional[Dict] = None, currently_syncing: Optional[str] = None # pylint: disable=bad-continuation

tests/test_bookmarks.py

+1-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
11
from copy import copy
22
import unittest
3-
from singer.bookmarks import State, write_state
4-
5-
6-
class TestWriteState(unittest.TestCase):
7-
def test_write_empty_state(self):
8-
state = State()
9-
write_state(state)
10-
11-
def test_write_state_with_bookmarks(self):
12-
stream_id_1 = "customers"
13-
bookmark_key_1 = "datetime"
14-
bookmark_val_1 = 123456789
15-
offset_key = "key"
16-
offset_val = "fizzy water"
17-
18-
bookmarks = {
19-
stream_id_1: {
20-
bookmark_key_1: bookmark_val_1,
21-
"offset": {offset_key: offset_val},
22-
}
23-
}
24-
25-
state = State(bookmarks=bookmarks, currently_syncing="customers")
26-
write_state(state)
3+
from singer.bookmarks import State
274

285

296
class TestGetBookmark(unittest.TestCase):

0 commit comments

Comments
 (0)