8
8
from arctic .exceptions import ConcurrentModificationException , NoDataFoundException
9
9
10
10
11
- def test_ConcurrentWriteBlock_simple ():
11
+ def test_ArcticTransaction_simple ():
12
12
vs = create_autospec (VersionStore , _collection = Mock ())
13
13
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
14
14
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
@@ -40,7 +40,7 @@ def test_ArticTransaction_no_audit():
40
40
assert vs ._write_audit .call_count == 0
41
41
42
42
43
- def test_ConcurrentWriteBlock_writes_if_metadata_changed ():
43
+ def test_ArcticTransaction_writes_if_metadata_changed ():
44
44
vs = create_autospec (VersionStore , _collection = Mock ())
45
45
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
46
46
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
@@ -65,7 +65,7 @@ def test_ConcurrentWriteBlock_writes_if_metadata_changed():
65
65
assert cwb ._do_write is False
66
66
67
67
68
- def test_ConcurrentWriteBlock_writes_if_base_data_corrupted ():
68
+ def test_ArcticTransaction_writes_if_base_data_corrupted ():
69
69
70
70
vs = create_autospec (VersionStore , _collection = Mock ())
71
71
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
@@ -83,7 +83,7 @@ def test_ConcurrentWriteBlock_writes_if_base_data_corrupted():
83
83
assert vs .list_versions .call_args_list == [call (sentinel .symbol )]
84
84
85
85
86
- def test_ConcurrentWriteBlock_writes_no_data_found ():
86
+ def test_ArcticTransaction_writes_no_data_found ():
87
87
vs = create_autospec (VersionStore , _collection = Mock ())
88
88
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
89
89
vs .read .side_effect = NoDataFoundException ('no data' )
@@ -101,7 +101,7 @@ def test_ConcurrentWriteBlock_writes_no_data_found():
101
101
call (sentinel .symbol )]
102
102
103
103
104
- def test_ConcurrentWriteBlock_writes_no_data_found_deleted ():
104
+ def test_ArcticTransaction_writes_no_data_found_deleted ():
105
105
vs = create_autospec (VersionStore , _collection = Mock ())
106
106
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
107
107
vs .read .side_effect = NoDataFoundException ('no data' )
@@ -119,7 +119,7 @@ def test_ConcurrentWriteBlock_writes_no_data_found_deleted():
119
119
call (sentinel .symbol )]
120
120
121
121
122
- def test_ConcurrentWriteBlock_does_nothing_when_data_not_modified ():
122
+ def test_ArcticTransaction_does_nothing_when_data_not_modified ():
123
123
vs = create_autospec (VersionStore , _collection = Mock ())
124
124
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
125
125
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
@@ -133,7 +133,7 @@ def test_ConcurrentWriteBlock_does_nothing_when_data_not_modified():
133
133
assert not vs .write .called
134
134
135
135
136
- def test_ConcurrentWriteBlock_does_nothing_when_data_is_None ():
136
+ def test_ArcticTransaction_does_nothing_when_data_is_None ():
137
137
vs = create_autospec (VersionStore , _collection = Mock ())
138
138
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
139
139
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
@@ -147,7 +147,7 @@ def test_ConcurrentWriteBlock_does_nothing_when_data_is_None():
147
147
assert not vs .write .called
148
148
149
149
150
- def test_ConcurrentWriteBlock_guards_against_inconsistent_ts ():
150
+ def test_ArcticTransaction_guards_against_inconsistent_ts ():
151
151
vs = create_autospec (VersionStore , _collection = Mock ())
152
152
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
153
153
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
@@ -160,7 +160,7 @@ def test_ConcurrentWriteBlock_guards_against_inconsistent_ts():
160
160
pass
161
161
162
162
163
- def test_ConcurrentWriteBlock_detects_concurrent_writes ():
163
+ def test_ArcticTransaction_detects_concurrent_writes ():
164
164
vs = create_autospec (VersionStore , _collection = Mock ())
165
165
ts1 = pd .DataFrame (index = [1 , 2 ], data = {'a' :[1.0 , 2.0 ]})
166
166
vs .read .return_value = VersionedItem (symbol = sentinel .symbol , library = sentinel .library , version = 1 , metadata = None , data = ts1 )
0 commit comments