Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix the rest of tests marked as XFAIL #222

Merged
merged 4 commits into from
Aug 24, 2023

Commits on Aug 23, 2023

  1. hub: fix Task.cancel_subtasks

    Task.cancel_task always returns NoneType and not bool.  Moreover, it
    catches any instance of MultipleObjectsReturned and ObjectDoesNotExist
    and reraises them only as a plain Exception.  Therefore, cancel_subtasks
    should catch plain Exceptions.
    
    Fixes the following traceback:
    ```
        def cancel_subtasks(self):
            """Cancel all subtasks of the task."""
            result = True
            for task in self.subtasks():
                try:
    >               result &= task.cancel_task()
    E               TypeError: unsupported operand type(s) for &=: 'bool' and 'NoneType'
    
    kobo/hub/models.py:910: TypeError
    ```
    
    Resolves: release-engineering#89
    lzaoral committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    043e472 View commit details
    Browse the repository at this point in the history
  2. tests: enable test_run_in_text_mode on Python 3.6

    ... and make the Python 3.7+ part conditional.
    lzaoral committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    507ae22 View commit details
    Browse the repository at this point in the history
  3. tests: test universal_newlines in test_run_in_text_mode

    'text' is just an alias for 'universal_newlines' so we should test that
    as well to cover older Python versions.
    lzaoral committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d83474b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b7bc9d6 View commit details
    Browse the repository at this point in the history