DataComparerLibrary 0.835__tar.gz → 0.838__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.
Files changed (17) hide show
  1. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/PKG-INFO +1 -1
  2. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/datacomparer.py +17 -16
  3. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/version.py +1 -1
  4. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary.egg-info/PKG-INFO +1 -1
  5. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/LICENSE.txt +0 -0
  6. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/README.rst +0 -0
  7. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/pyproject.toml +0 -0
  8. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/setup.cfg +0 -0
  9. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/setup.py +0 -0
  10. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/__init__.py +0 -0
  11. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/datasorter.py +0 -0
  12. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/delimitertranslator.py +0 -0
  13. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary/fileconverter.py +0 -0
  14. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary.egg-info/SOURCES.txt +0 -0
  15. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary.egg-info/dependency_links.txt +0 -0
  16. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/src/DataComparerLibrary.egg-info/top_level.txt +0 -0
  17. {DataComparerLibrary-0.835 → DataComparerLibrary-0.838}/test/test1.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: DataComparerLibrary
3
- Version: 0.835
3
+ Version: 0.838
4
4
  Summary: For comparing csv-files or 2d-array with csv-file.
5
5
  Home-page:
6
6
  Author: René Philip Zuijderduijn
@@ -221,20 +221,20 @@ class DataComparer:
221
221
  difference_found = True
222
222
  DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], expected_data_including_templates[row_nr][column_nr], "Date template format displayed. See also next message line.")
223
223
  DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], expected_data, "There is a difference between actual and expected data.")
224
- continue
224
+ continue
225
225
  #
226
226
  if "{NOT(" in expected_data_including_templates[row_nr][column_nr].upper():
227
- unwanted_expected_data = DataComparer.__get_unwanted_expected_data(self, expected_data_including_date_template)
228
- #
229
- if unwanted_expected_data == -1:
230
- difference_found = True
231
- DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], expected_data_including_templates[row_nr][column_nr], "NOT() has been found in expected data field, but format is incorrect.")
232
- else:
227
+ try:
228
+ unwanted_expected_data = DataComparer.__get_unwanted_expected_data(self, expected_data_including_date_template)
229
+ #
233
230
  if fnmatch.fnmatch(actual_data[row_nr][column_nr], unwanted_expected_data):
234
231
  # Unwanted match.
235
232
  difference_found = True
236
233
  DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], expected_data_including_templates[row_nr][column_nr], "NOT() template format displayed. See also next message line.")
237
234
  DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], unwanted_expected_data, "Actual and expected data are equal. However actual data should NOT be equal to the expected data!!!")
235
+ except:
236
+ difference_found = True
237
+ DataComparer.__print_comparation_result(self, row_nr, column_nr, actual_data[row_nr][column_nr], expected_data_including_templates[row_nr][column_nr], "NOT() has been found in expected data field, but format is incorrect.")
238
238
  #
239
239
  else:
240
240
  if not skip_exception_rule_used:
@@ -371,17 +371,18 @@ class DataComparer:
371
371
 
372
372
 
373
373
  def __get_unwanted_expected_data(self, expected_data_field_including_date_template):
374
- position_open_brace_not_text = expected_data_field_including_date_template.find("{NOT(")
375
- position_close_brace_not_text = expected_data_field_including_date_template.find(")}", position_open_brace_not_text)
374
+ position_open_brace = expected_data_field_including_date_template.find("{NOT(")
375
+ position_close_brace = expected_data_field_including_date_template.find(")}", position_open_brace)
376
376
  #
377
- if position_open_brace_not_text == -1:
378
- #print("position_open_brace_not_text:", position_open_brace_not_text)
379
- return -1
377
+ if position_open_brace == -1:
378
+ #print("position_open_brace:", position_open_brace)
379
+ raise Exception()
380
380
  #
381
- if position_close_brace_not_text == -1:
382
- #print("position_close_brace_not_text:", position_close_brace_not_text)
383
- return -1
381
+ if position_close_brace == -1:
382
+ #print("position_close_brace:", position_close_brace)
383
+ raise Exception()
384
384
  #
385
- unwanted_expected_data = expected_data_field_including_date_template[position_open_brace_not_text+5:position_close_brace_not_text]
385
+ unwanted_expected_data = expected_data_field_including_date_template[position_open_brace+5:position_close_brace]
386
386
  return unwanted_expected_data
387
387
 
388
+
@@ -1,3 +1,3 @@
1
1
  # encoding=utf-8
2
2
 
3
- VERSION = '0.835'
3
+ VERSION = '0.838'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: DataComparerLibrary
3
- Version: 0.835
3
+ Version: 0.838
4
4
  Summary: For comparing csv-files or 2d-array with csv-file.
5
5
  Home-page:
6
6
  Author: René Philip Zuijderduijn