intercom_test.augmentation.update_file module¶
-
class
intercom_test.augmentation.update_file.
CaseReader
(stream, start_byte, key_fields, *, safe_loading=None)[source]¶ Bases:
object
Given a file and a starting point, reads the case data
Can be used to
augment()
adict
of test case values or to readaugmentation_data_events()
for updating a compact file.-
TRAILING_WS
= re.compile('\\s+\n')¶
-
safe_loading
= True¶
-
-
class
intercom_test.augmentation.update_file.
Indexer
(key_fields, *, safe_loading=None)[source]¶ Bases:
object
Builds an index of the augmentation data in a working/update file
While an update file may be in any valid YAML format, certain formats are more efficient for the system to manage. Specifically, it is best if:
- The top-level sequence is represented in block (not flow) format
- Each case is “atomic” – that is, contains no aliases to nodes outside it’s own entry in the sequence
In cases where these conditions are not met, the indexer notes the cases in the output, but does not provide a starting offset into the file. The result: augmenting the case (or updating the compact augmentation file) requires reloading the entire YAML file, not just the single case.
-
class
State
[source]¶ Bases:
enum.Enum
An enumeration.
-
case_data_key_collection
= 4¶
-
case_data_value
= 5¶
-
case_data_value_collection
= 6¶
-
case_mapping
= 3¶
-
header
= 1¶
-
tail
= 7¶
-
top_sequence
= 2¶
-
-
safe_loading
= True¶