Loading

Paste #p9sqcjv3h

  1. =================================================================== FAILURES ===================================================================
  2. _____________________________________________________________ test_merged_changes ______________________________________________________________
  3.  
  4. service = <tuid.service.TUIDService instance at 0x7f9a99aeeb00>
  5.  
  6.     def test_merged_changes(service):
  7.         old_rev = '316e5fab18f1'
  8.         new_rev = '06d10d09e6ee'
  9.         test_files = [
  10.             "js/src/wasm/WasmTextToBinary.cpp"
  11.         ]
  12.         service.clogger.disable_all()
  13.         service.clogger.initialize_to_range(old_rev, new_rev)
  14.         with service.conn.transaction() as t:
  15.             t.execute("DELETE FROM latestFileMod WHERE file=" + quote_value(test_files[0]))
  16.             t.execute("DELETE FROM annotations WHERE file=" + quote_value(test_files[0]))
  17.    
  18.         old_tuids, _ = service.get_tuids_from_files(test_files, old_rev, use_thread=False)
  19.         new_tuids, _ = service.get_tuids_from_files(test_files, new_rev, use_thread=False)
  20.    
  21.         lines_added = {
  22.             "js/src/wasm/WasmTextToBinary.cpp": [1668, 1669, 1670, 1671]
  23.         }
  24.         completed = 0
  25.         for file, old_file_tuids in old_tuids:
  26.             if file in lines_added:
  27.                 assert len(old_file_tuids) == 5461
  28.    
  29.                 for new_file, tmp_tuids in new_tuids:
  30.                     new_file_tuids = []
  31.                     if new_file == file:
  32.                         for tuid_map in tmp_tuids:
  33.                             if tuid_map.line in lines_added[file]:
  34.                                 new_file_tuids.append(tuid_map.tuid)
  35.    
  36. >                       assert len(tmp_tuids) == 5461
  37. E                       assert 5455 == 5461
  38. E                        +  where 5455 = len([TuidMap(tuid=41480, line=1), TuidMap(tuid=41481, line=2), TuidMap(tuid=41482, line=3), TuidMap(tuid=41483, line=4), TuidMap(tuid=41484, line=5), TuidMap(tuid=41485, line=6), ...])
  39.  
  40. tests/test_basic.py:796: AssertionError
  41. =============================================================== warnings summary ===============================================================
  42. vendor/mo_logs/exceptions.py:80
  43. vendor/mo_logs/exceptions.py:80
  44. vendor/mo_logs/exceptions.py:80
  45. vendor/mo_logs/exceptions.py:80
  46. vendor/mo_logs/exceptions.py:80
  47. vendor/mo_logs/exceptions.py:80
  48. vendor/mo_logs/exceptions.py:80
  49. vendor/mo_logs/exceptions.py:80
  50. vendor/mo_logs/exceptions.py:80
  51. vendor/mo_logs/exceptions.py:80
  52. tests/test_basic.py::test_transactions
  53. tests/test_basic.py::test_transactions
  54.   /home/rahul/TUID/vendor/mo_logs/exceptions.py:80: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  55.     if hasattr(e, "message") and e.message:
  56.  
  57. vendor/mo_logs/exceptions.py:81
  58. vendor/mo_logs/exceptions.py:81
  59. vendor/mo_logs/exceptions.py:81
  60. vendor/mo_logs/exceptions.py:81
  61. vendor/mo_logs/exceptions.py:81
  62. tests/test_basic.py::test_transactions
  63.   /home/rahul/TUID/vendor/mo_logs/exceptions.py:81: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  64.     output = Except(type=ERROR, template=text_type(e.message), trace=trace, cause=cause)
  65.  
  66. -- Docs: https://docs.pytest.org/en/latest/warnings.html
  67. ================================= 1 failed, 39 passed, 3 skipped, 11 deselected, 18 warnings in 510.36 seconds =================================
  68. rahul (dev) TUID $