DataComparerLibrary 0.855__tar.gz → 0.857__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/PKG-INFO +44 -11
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/README.rst +37 -10
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/pyproject.toml +8 -1
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/__init__.py +0 -3
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datacomparer.py +9 -9
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/PKG-INFO +44 -11
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/LICENSE.txt +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/setup.cfg +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datasorter.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datetimehandler.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/delimitertranslator.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/field.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/fileconverter.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/matchstatus.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/report.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/row.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/tools.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/twodarray.py +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/SOURCES.txt +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/dependency_links.txt +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/requires.txt +0 -0
- {datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/top_level.txt +0 -0
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DataComparerLibrary
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.857
|
|
4
4
|
Summary: For comparing csv-files, 2d-array with a csv-file or 2d-arrays. For comparing text-files, text variable with a text-file or text variables. Including a sorting module.
|
|
5
5
|
Author-email: René Philip Zuijderduijn <datacomparerlibrary@outlook.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
8
|
+
Project-URL: Keyword docs, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
9
|
+
Project-URL: Source, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/ReneFromHolland/DataComparerLibrary/issues
|
|
11
|
+
Project-URL: Documentation, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
7
12
|
Keywords: robotframework,Robot Framework,testing,test-automation,datacompare,data compare,compare csv files,compare text files,compare txt files,compare arrays,compare text
|
|
8
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
14
|
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
@@ -14,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
23
|
Classifier: Topic :: Software Development :: Testing
|
|
18
24
|
Requires-Python: >=3.8
|
|
19
25
|
Description-Content-Type: text/x-rst
|
|
@@ -29,6 +35,11 @@ DataComparerLibrary
|
|
|
29
35
|
:local:
|
|
30
36
|
|
|
31
37
|
|
|
38
|
+
Documentation
|
|
39
|
+
===================
|
|
40
|
+
See `keyword documentation`_ for available keywords and more information
|
|
41
|
+
about the library in general.
|
|
42
|
+
|
|
32
43
|
Preparation
|
|
33
44
|
===================
|
|
34
45
|
|
|
@@ -36,13 +47,17 @@ Installation
|
|
|
36
47
|
------------
|
|
37
48
|
|
|
38
49
|
If you already have Python with `pip <https://pip.pypa.io>`_ installed,
|
|
39
|
-
you can simply run
|
|
50
|
+
you can simply run:
|
|
51
|
+
|
|
52
|
+
.. sourcecode::
|
|
40
53
|
|
|
41
54
|
pip install DataComparerLibrary
|
|
42
55
|
pip install --upgrade DataComparerLibrary
|
|
43
56
|
|
|
44
57
|
|
|
45
|
-
Also the following pip package is needed
|
|
58
|
+
Also the following pip package is needed:
|
|
59
|
+
|
|
60
|
+
.. sourcecode::
|
|
46
61
|
|
|
47
62
|
pip install python-dateutil
|
|
48
63
|
|
|
@@ -50,7 +65,9 @@ Also the following pip package is needed::
|
|
|
50
65
|
Import statement for the DataComparerLibrary in Python
|
|
51
66
|
------------------------------------------------------
|
|
52
67
|
|
|
53
|
-
|
|
68
|
+
.. sourcecode::
|
|
69
|
+
|
|
70
|
+
from DataComparerLibrary.datacomparer import DataComparer
|
|
54
71
|
|
|
55
72
|
|
|
56
73
|
|
|
@@ -66,8 +83,16 @@ The DataComparerLibrary can be used for:
|
|
|
66
83
|
- comparing a csv-file or text-file with a 2d-matrix
|
|
67
84
|
- comparing 2d-matrices
|
|
68
85
|
|
|
69
|
-
|
|
|
70
|
-
|
|
86
|
+
| The DataComparer will present the actual data and the expected data.
|
|
87
|
+
| In case a difference between actual and expected data is found an exception wil be given. Also these differences will be presented.
|
|
88
|
+
| In Robot Framework the comparison result will be set to failed.
|
|
89
|
+
|
|
|
90
|
+
|
|
91
|
+
|
|
|
92
|
+
|
|
93
|
+
Special options
|
|
94
|
+
---------------
|
|
95
|
+
|
|
71
96
|
| A strait comparison can be made, but the DataComparerLibrary offers also some special comparison options described
|
|
72
97
|
beneath.
|
|
73
98
|
|
|
|
@@ -135,8 +160,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
135
160
|
Examples of using the DataComparerLibrary keywords for comparing data in Robot Framework
|
|
136
161
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
137
162
|
|
|
138
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
163
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
139
164
|
|
|
165
|
+
.. sourcecode::
|
|
140
166
|
|
|
141
167
|
*** Settings ***
|
|
142
168
|
Library DataComparerLibrary
|
|
@@ -222,8 +248,9 @@ Comparing Text
|
|
|
222
248
|
Examples of using the DataComparerLibrary for comparing text in Python
|
|
223
249
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
224
250
|
|
|
225
|
-
Below there are some examples how to call the methods of the DataComparerLibrary in Python
|
|
251
|
+
Below there are some examples how to call the methods of the DataComparerLibrary in Python:
|
|
226
252
|
|
|
253
|
+
.. sourcecode::
|
|
227
254
|
|
|
228
255
|
a = DataComparer
|
|
229
256
|
a.compare_text_files(self, actual_file, expected_file)
|
|
@@ -235,8 +262,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
235
262
|
Examples of using the DataComparerLibrary keywords for comparing text in Robot Framework
|
|
236
263
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
237
264
|
|
|
238
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
265
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
239
266
|
|
|
267
|
+
.. sourcecode::
|
|
240
268
|
|
|
241
269
|
*** Settings ***
|
|
242
270
|
Library DataComparerLibrary
|
|
@@ -296,8 +324,9 @@ Special sorting
|
|
|
296
324
|
Examples of using the DataComparerLibrary keywords for sorting data in Robot Framework
|
|
297
325
|
----------------------------------------------------------------------------------------
|
|
298
326
|
|
|
299
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
327
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
300
328
|
|
|
329
|
+
.. sourcecode::
|
|
301
330
|
|
|
302
331
|
*** Settings ***
|
|
303
332
|
Library DataComparerLibrary
|
|
@@ -342,8 +371,9 @@ the input file. The result will be written to an output file.
|
|
|
342
371
|
Examples of using the DataComparerLibrary keywords for preparing data in Robot Framework
|
|
343
372
|
----------------------------------------------------------------------------------------
|
|
344
373
|
|
|
345
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
374
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
346
375
|
|
|
376
|
+
.. sourcecode::
|
|
347
377
|
|
|
348
378
|
*** Settings ***
|
|
349
379
|
Library DataComparerLibrary
|
|
@@ -365,3 +395,6 @@ Below there are some examples how to call the keywords of the DataComparerLibrar
|
|
|
365
395
|
DataComparerLibrary.Replace Separate Lf input_file_with_separate_lf.txt output_file_lf_replaced_by_character_or_string.txt ${SPACE}
|
|
366
396
|
|
|
367
397
|
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
.. _Keyword Documentation: https://renefromholland.github.io/DataComparerLibrary/DataComparerLibraryKeywords.html
|
|
@@ -6,6 +6,11 @@ DataComparerLibrary
|
|
|
6
6
|
:local:
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
Documentation
|
|
10
|
+
===================
|
|
11
|
+
See `keyword documentation`_ for available keywords and more information
|
|
12
|
+
about the library in general.
|
|
13
|
+
|
|
9
14
|
Preparation
|
|
10
15
|
===================
|
|
11
16
|
|
|
@@ -13,13 +18,17 @@ Installation
|
|
|
13
18
|
------------
|
|
14
19
|
|
|
15
20
|
If you already have Python with `pip <https://pip.pypa.io>`_ installed,
|
|
16
|
-
you can simply run
|
|
21
|
+
you can simply run:
|
|
22
|
+
|
|
23
|
+
.. sourcecode::
|
|
17
24
|
|
|
18
25
|
pip install DataComparerLibrary
|
|
19
26
|
pip install --upgrade DataComparerLibrary
|
|
20
27
|
|
|
21
28
|
|
|
22
|
-
Also the following pip package is needed
|
|
29
|
+
Also the following pip package is needed:
|
|
30
|
+
|
|
31
|
+
.. sourcecode::
|
|
23
32
|
|
|
24
33
|
pip install python-dateutil
|
|
25
34
|
|
|
@@ -27,7 +36,9 @@ Also the following pip package is needed::
|
|
|
27
36
|
Import statement for the DataComparerLibrary in Python
|
|
28
37
|
------------------------------------------------------
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
.. sourcecode::
|
|
40
|
+
|
|
41
|
+
from DataComparerLibrary.datacomparer import DataComparer
|
|
31
42
|
|
|
32
43
|
|
|
33
44
|
|
|
@@ -43,8 +54,16 @@ The DataComparerLibrary can be used for:
|
|
|
43
54
|
- comparing a csv-file or text-file with a 2d-matrix
|
|
44
55
|
- comparing 2d-matrices
|
|
45
56
|
|
|
46
|
-
|
|
|
47
|
-
|
|
57
|
+
| The DataComparer will present the actual data and the expected data.
|
|
58
|
+
| In case a difference between actual and expected data is found an exception wil be given. Also these differences will be presented.
|
|
59
|
+
| In Robot Framework the comparison result will be set to failed.
|
|
60
|
+
|
|
|
61
|
+
|
|
62
|
+
|
|
|
63
|
+
|
|
64
|
+
Special options
|
|
65
|
+
---------------
|
|
66
|
+
|
|
48
67
|
| A strait comparison can be made, but the DataComparerLibrary offers also some special comparison options described
|
|
49
68
|
beneath.
|
|
50
69
|
|
|
|
@@ -112,8 +131,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
112
131
|
Examples of using the DataComparerLibrary keywords for comparing data in Robot Framework
|
|
113
132
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
114
133
|
|
|
115
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
134
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
116
135
|
|
|
136
|
+
.. sourcecode::
|
|
117
137
|
|
|
118
138
|
*** Settings ***
|
|
119
139
|
Library DataComparerLibrary
|
|
@@ -199,8 +219,9 @@ Comparing Text
|
|
|
199
219
|
Examples of using the DataComparerLibrary for comparing text in Python
|
|
200
220
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
201
221
|
|
|
202
|
-
Below there are some examples how to call the methods of the DataComparerLibrary in Python
|
|
222
|
+
Below there are some examples how to call the methods of the DataComparerLibrary in Python:
|
|
203
223
|
|
|
224
|
+
.. sourcecode::
|
|
204
225
|
|
|
205
226
|
a = DataComparer
|
|
206
227
|
a.compare_text_files(self, actual_file, expected_file)
|
|
@@ -212,8 +233,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
212
233
|
Examples of using the DataComparerLibrary keywords for comparing text in Robot Framework
|
|
213
234
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
214
235
|
|
|
215
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
236
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
216
237
|
|
|
238
|
+
.. sourcecode::
|
|
217
239
|
|
|
218
240
|
*** Settings ***
|
|
219
241
|
Library DataComparerLibrary
|
|
@@ -273,8 +295,9 @@ Special sorting
|
|
|
273
295
|
Examples of using the DataComparerLibrary keywords for sorting data in Robot Framework
|
|
274
296
|
----------------------------------------------------------------------------------------
|
|
275
297
|
|
|
276
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
298
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
277
299
|
|
|
300
|
+
.. sourcecode::
|
|
278
301
|
|
|
279
302
|
*** Settings ***
|
|
280
303
|
Library DataComparerLibrary
|
|
@@ -319,8 +342,9 @@ the input file. The result will be written to an output file.
|
|
|
319
342
|
Examples of using the DataComparerLibrary keywords for preparing data in Robot Framework
|
|
320
343
|
----------------------------------------------------------------------------------------
|
|
321
344
|
|
|
322
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
345
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
323
346
|
|
|
347
|
+
.. sourcecode::
|
|
324
348
|
|
|
325
349
|
*** Settings ***
|
|
326
350
|
Library DataComparerLibrary
|
|
@@ -342,3 +366,6 @@ Below there are some examples how to call the keywords of the DataComparerLibrar
|
|
|
342
366
|
DataComparerLibrary.Replace Separate Lf input_file_with_separate_lf.txt output_file_lf_replaced_by_character_or_string.txt ${SPACE}
|
|
343
367
|
|
|
344
368
|
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
.. _Keyword Documentation: https://renefromholland.github.io/DataComparerLibrary/DataComparerLibraryKeywords.html
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "DataComparerLibrary"
|
|
8
8
|
description = "For comparing csv-files, 2d-array with a csv-file or 2d-arrays. For comparing text-files, text variable with a text-file or text variables. Including a sorting module."
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.857"
|
|
10
10
|
dependencies = ["python-dateutil"]
|
|
11
11
|
authors = [{ name = "René Philip Zuijderduijn", email = "datacomparerlibrary@outlook.com" }]
|
|
12
12
|
readme = "README.rst"
|
|
@@ -22,12 +22,19 @@ classifiers=[
|
|
|
22
22
|
"Programming Language :: Python :: 3.11",
|
|
23
23
|
"Programming Language :: Python :: 3.12",
|
|
24
24
|
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
25
26
|
"Topic :: Software Development :: Testing",
|
|
26
27
|
]
|
|
27
28
|
requires-python = ">=3.8"
|
|
28
29
|
keywords = ["robotframework", "Robot Framework","testing", "test-automation", "datacompare", "data compare", "compare csv files",
|
|
29
30
|
"compare text files", "compare txt files", "compare arrays", "compare text"]
|
|
30
31
|
|
|
32
|
+
[project.urls]
|
|
33
|
+
"Homepage" = "https://github.com/ReneFromHolland/DataComparerLibrary"
|
|
34
|
+
"Keyword docs" = "https://github.com/ReneFromHolland/DataComparerLibrary"
|
|
35
|
+
"Source" = "https://github.com/ReneFromHolland/DataComparerLibrary"
|
|
36
|
+
"Issue Tracker" = "https://github.com/ReneFromHolland/DataComparerLibrary/issues"
|
|
37
|
+
"Documentation" = "https://github.com/ReneFromHolland/DataComparerLibrary"
|
|
31
38
|
|
|
32
39
|
[tool.setuptools]
|
|
33
40
|
package-dir = { "" = "src" }
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datacomparer.py
RENAMED
|
@@ -14,7 +14,7 @@ class DataComparer:
|
|
|
14
14
|
#
|
|
15
15
|
expected_data = self.__get_data_from_csv_input_file(expected_file, delimiter_expected_data, quotechar_expected_data)
|
|
16
16
|
#
|
|
17
|
-
DataComparer.
|
|
17
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def compare_data_file_with_2d_array(self, actual_file, expected_data, delimiter_actual_data=",", quotechar_actual_data='"', template_literals_dict=None):
|
|
@@ -23,14 +23,14 @@ class DataComparer:
|
|
|
23
23
|
#
|
|
24
24
|
actual_data = self.__get_data_from_csv_input_file(actual_file, delimiter_actual_data, quotechar_actual_data)
|
|
25
25
|
#
|
|
26
|
-
DataComparer.
|
|
26
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def compare_data_2d_arrays(self, actual_data, expected_data, template_literals_dict=None):
|
|
30
30
|
self.__check_if_actual_data_is_present(actual_data)
|
|
31
31
|
self.__check_if_expected_data_is_present(expected_data)
|
|
32
32
|
#
|
|
33
|
-
DataComparer.
|
|
33
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def compare_data_files(self, actual_file, expected_file, delimiter_actual_data=",", delimiter_expected_data=",", quotechar_actual_data='"', quotechar_expected_data='"', template_literals_dict=None):
|
|
@@ -40,7 +40,7 @@ class DataComparer:
|
|
|
40
40
|
actual_data = self.__get_data_from_csv_input_file(actual_file, delimiter_actual_data, quotechar_actual_data)
|
|
41
41
|
expected_data = self.__get_data_from_csv_input_file(expected_file, delimiter_expected_data, quotechar_expected_data)
|
|
42
42
|
#
|
|
43
|
-
DataComparer.
|
|
43
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -51,7 +51,7 @@ class DataComparer:
|
|
|
51
51
|
actual_data = self.__split_text_into_textline_array(actual_text)
|
|
52
52
|
expected_data = self.__split_textfile_into_textline_array(expected_file)
|
|
53
53
|
#
|
|
54
|
-
DataComparer.
|
|
54
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
def compare_text_file_with_text_variable(self, actual_file, expected_text, template_literals_dict=None):
|
|
@@ -61,7 +61,7 @@ class DataComparer:
|
|
|
61
61
|
actual_data = self.__split_textfile_into_textline_array(actual_file)
|
|
62
62
|
expected_data = self.__split_text_into_textline_array(expected_text)
|
|
63
63
|
#
|
|
64
|
-
DataComparer.
|
|
64
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
def compare_text_variables(self, actual_text, expected_text, template_literals_dict=None):
|
|
@@ -71,7 +71,7 @@ class DataComparer:
|
|
|
71
71
|
actual_data = self.__split_text_into_textline_array(actual_text)
|
|
72
72
|
expected_data = self.__split_text_into_textline_array(expected_text)
|
|
73
73
|
#
|
|
74
|
-
DataComparer.
|
|
74
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def compare_text_files(self, actual_file, expected_file, template_literals_dict=None):
|
|
@@ -81,12 +81,12 @@ class DataComparer:
|
|
|
81
81
|
actual_data = self.__split_textfile_into_textline_array(actual_file)
|
|
82
82
|
expected_data = self.__split_textfile_into_textline_array(expected_file)
|
|
83
83
|
#
|
|
84
|
-
DataComparer.
|
|
84
|
+
DataComparer.__compare_data(actual_data, expected_data, template_literals_dict)
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
@staticmethod
|
|
89
|
-
def
|
|
89
|
+
def __compare_data(actual_data, expected_data, template_literals_dict=None):
|
|
90
90
|
if template_literals_dict is not None and not isinstance(template_literals_dict, dict):
|
|
91
91
|
raise Exception(f"The argument passed to parameter 'template_literals_dict' is not a dictionary. Value is: '{template_literals_dict}'.")
|
|
92
92
|
actual_data = DataComparer.__make_data_2d_compliant(actual_data)
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/PKG-INFO
RENAMED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DataComparerLibrary
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.857
|
|
4
4
|
Summary: For comparing csv-files, 2d-array with a csv-file or 2d-arrays. For comparing text-files, text variable with a text-file or text variables. Including a sorting module.
|
|
5
5
|
Author-email: René Philip Zuijderduijn <datacomparerlibrary@outlook.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
8
|
+
Project-URL: Keyword docs, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
9
|
+
Project-URL: Source, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/ReneFromHolland/DataComparerLibrary/issues
|
|
11
|
+
Project-URL: Documentation, https://github.com/ReneFromHolland/DataComparerLibrary
|
|
7
12
|
Keywords: robotframework,Robot Framework,testing,test-automation,datacompare,data compare,compare csv files,compare text files,compare txt files,compare arrays,compare text
|
|
8
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
14
|
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
@@ -14,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
23
|
Classifier: Topic :: Software Development :: Testing
|
|
18
24
|
Requires-Python: >=3.8
|
|
19
25
|
Description-Content-Type: text/x-rst
|
|
@@ -29,6 +35,11 @@ DataComparerLibrary
|
|
|
29
35
|
:local:
|
|
30
36
|
|
|
31
37
|
|
|
38
|
+
Documentation
|
|
39
|
+
===================
|
|
40
|
+
See `keyword documentation`_ for available keywords and more information
|
|
41
|
+
about the library in general.
|
|
42
|
+
|
|
32
43
|
Preparation
|
|
33
44
|
===================
|
|
34
45
|
|
|
@@ -36,13 +47,17 @@ Installation
|
|
|
36
47
|
------------
|
|
37
48
|
|
|
38
49
|
If you already have Python with `pip <https://pip.pypa.io>`_ installed,
|
|
39
|
-
you can simply run
|
|
50
|
+
you can simply run:
|
|
51
|
+
|
|
52
|
+
.. sourcecode::
|
|
40
53
|
|
|
41
54
|
pip install DataComparerLibrary
|
|
42
55
|
pip install --upgrade DataComparerLibrary
|
|
43
56
|
|
|
44
57
|
|
|
45
|
-
Also the following pip package is needed
|
|
58
|
+
Also the following pip package is needed:
|
|
59
|
+
|
|
60
|
+
.. sourcecode::
|
|
46
61
|
|
|
47
62
|
pip install python-dateutil
|
|
48
63
|
|
|
@@ -50,7 +65,9 @@ Also the following pip package is needed::
|
|
|
50
65
|
Import statement for the DataComparerLibrary in Python
|
|
51
66
|
------------------------------------------------------
|
|
52
67
|
|
|
53
|
-
|
|
68
|
+
.. sourcecode::
|
|
69
|
+
|
|
70
|
+
from DataComparerLibrary.datacomparer import DataComparer
|
|
54
71
|
|
|
55
72
|
|
|
56
73
|
|
|
@@ -66,8 +83,16 @@ The DataComparerLibrary can be used for:
|
|
|
66
83
|
- comparing a csv-file or text-file with a 2d-matrix
|
|
67
84
|
- comparing 2d-matrices
|
|
68
85
|
|
|
69
|
-
|
|
|
70
|
-
|
|
86
|
+
| The DataComparer will present the actual data and the expected data.
|
|
87
|
+
| In case a difference between actual and expected data is found an exception wil be given. Also these differences will be presented.
|
|
88
|
+
| In Robot Framework the comparison result will be set to failed.
|
|
89
|
+
|
|
|
90
|
+
|
|
91
|
+
|
|
|
92
|
+
|
|
93
|
+
Special options
|
|
94
|
+
---------------
|
|
95
|
+
|
|
71
96
|
| A strait comparison can be made, but the DataComparerLibrary offers also some special comparison options described
|
|
72
97
|
beneath.
|
|
73
98
|
|
|
|
@@ -135,8 +160,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
135
160
|
Examples of using the DataComparerLibrary keywords for comparing data in Robot Framework
|
|
136
161
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
137
162
|
|
|
138
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
163
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
139
164
|
|
|
165
|
+
.. sourcecode::
|
|
140
166
|
|
|
141
167
|
*** Settings ***
|
|
142
168
|
Library DataComparerLibrary
|
|
@@ -222,8 +248,9 @@ Comparing Text
|
|
|
222
248
|
Examples of using the DataComparerLibrary for comparing text in Python
|
|
223
249
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
224
250
|
|
|
225
|
-
Below there are some examples how to call the methods of the DataComparerLibrary in Python
|
|
251
|
+
Below there are some examples how to call the methods of the DataComparerLibrary in Python:
|
|
226
252
|
|
|
253
|
+
.. sourcecode::
|
|
227
254
|
|
|
228
255
|
a = DataComparer
|
|
229
256
|
a.compare_text_files(self, actual_file, expected_file)
|
|
@@ -235,8 +262,9 @@ Below there are some examples how to call the methods of the DataComparerLibrary
|
|
|
235
262
|
Examples of using the DataComparerLibrary keywords for comparing text in Robot Framework
|
|
236
263
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
237
264
|
|
|
238
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
265
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
239
266
|
|
|
267
|
+
.. sourcecode::
|
|
240
268
|
|
|
241
269
|
*** Settings ***
|
|
242
270
|
Library DataComparerLibrary
|
|
@@ -296,8 +324,9 @@ Special sorting
|
|
|
296
324
|
Examples of using the DataComparerLibrary keywords for sorting data in Robot Framework
|
|
297
325
|
----------------------------------------------------------------------------------------
|
|
298
326
|
|
|
299
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
327
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
300
328
|
|
|
329
|
+
.. sourcecode::
|
|
301
330
|
|
|
302
331
|
*** Settings ***
|
|
303
332
|
Library DataComparerLibrary
|
|
@@ -342,8 +371,9 @@ the input file. The result will be written to an output file.
|
|
|
342
371
|
Examples of using the DataComparerLibrary keywords for preparing data in Robot Framework
|
|
343
372
|
----------------------------------------------------------------------------------------
|
|
344
373
|
|
|
345
|
-
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework
|
|
374
|
+
Below there are some examples how to call the keywords of the DataComparerLibrary in Robot Framework:
|
|
346
375
|
|
|
376
|
+
.. sourcecode::
|
|
347
377
|
|
|
348
378
|
*** Settings ***
|
|
349
379
|
Library DataComparerLibrary
|
|
@@ -365,3 +395,6 @@ Below there are some examples how to call the keywords of the DataComparerLibrar
|
|
|
365
395
|
DataComparerLibrary.Replace Separate Lf input_file_with_separate_lf.txt output_file_lf_replaced_by_character_or_string.txt ${SPACE}
|
|
366
396
|
|
|
367
397
|
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
.. _Keyword Documentation: https://renefromholland.github.io/DataComparerLibrary/DataComparerLibraryKeywords.html
|
|
File without changes
|
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datasorter.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/datetimehandler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/fileconverter.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/matchstatus.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary/twodarray.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.855 → datacomparerlibrary-0.857}/src/DataComparerLibrary.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|