Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1936

Fix a warning in tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.4.0
    • Component/s: Tests

      Description

       [INFO]      [exec] recwarn = WarningsRecorder(record=True)
       [INFO]      [exec]     @pytest.fixture(autouse=True)
       [INFO]      [exec]     def no_warnings(recwarn):
       [INFO]      [exec]         """Fail on warning."""
       [INFO]      [exec]         yield
       [INFO]      [exec]         warnings = []
       [INFO]      [exec]         for warning in recwarn:  # pragma: no cover
       [INFO]      [exec]             message = str(warning.message)
       [INFO]      [exec]             if "sentry_sdk" in warning.filename:
       [INFO]      [exec]                 continue
       [INFO]      [exec]             elif "WaitForInputIdle" in message:
       [INFO]      [exec]                 # Happen while testing the integration on Windows, we can skip it:
       [INFO]      [exec]                 # "Application is not loaded correctly (WaitForInputIdle failed)"
       [INFO]      [exec]                 continue
       [INFO]      [exec]             warn = f"{warning.filename}:{warning.lineno} {message}"
       [INFO]      [exec]             print(warn, file=sys.stderr)
       [INFO]      [exec]             warnings.append(warn)
       [INFO]      [exec] >       assert not warnings
       [INFO]      [exec] E       assert not ['/opt/jenkins/workspace/Drive/Drive-OS-test-jobs/Drive-tests-linux-master/sources/tests/old_functional/test_synchronization.py:607 asserting the value None, please use "assert is None"']
       [INFO]      [exec] message    = 'asserting the value None, please use "assert is None"'
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 minutes
                5m