VirtusLab / git-machete

Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen
MIT License
899 stars 49 forks source link

`tox` failing locally (not on CI) on `TypeError: list indices must be integers or slices, not str` #246

Closed PawelLipski closed 2 years ago

PawelLipski commented 2 years ago
$ tox -e py39
py39 create: /home/plipski/git-machete/.tox/py39
py39 installdeps: -r/home/plipski/git-machete/requirements.txt, -r/home/plipski/git-machete/test-requirements.txt
py39 installed: attrs==21.2.0,autopage==0.4.0,cliff==3.9.0,cmd2==2.2.0,colorama==0.4.4,extras==1.0.0,fixtures==3.0.0,future==0.18.2,git-machete==3.4.0,mypy==0.910,mypy-extensions==0.4.3,pbr==5.6.0,prettytable==2.2.0,pyparsing==2.4.7,pyperclip==1.8.2,python-subunit==1.4.0,PyYAML==5.4.1,six==1.16.0,stestr==3.2.0,stevedore==3.4.0,testtools==2.5.0,toml==0.10.2,typing-extensions==3.10.0.2,voluptuous==0.12.1,wcwidth==0.2.5
py39 run-test-pre: PYTHONHASHSEED='986033094'
py39 run-test: commands[0] | mypy --config-file mypy.ini git_machete
Success: no issues found in 13 source files
py39 run-test: commands[1] | stestr run
/home/plipski/git-machete/.tox/py39/lib/python3.9/site-packages/future/standard_library/__init__.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
{3} git_machete.tests.functional.test_machete.MacheteTester.test_branch_reappers_in_definition [0.058070s] ... ok

`root` does not have any downstream (child) branches to advance towards
{7} git_machete.tests.functional.test_machete.MacheteTester.test_advance_with_no_downstream_branches [0.143814s] ... ok
{1} git_machete.tests.functional.test_machete.MacheteTester.test_go_up [0.204518s] ... ok

More than one downstream (child) branch of `root` is connected to `root` with a green edge and `-y/--yes` option is specified
{6} git_machete.tests.functional.test_machete.MacheteTester.test_advance_with_few_possible_downstream_branches_and_yes_option [0.303693s] ... ok
Updating bd275dc..57ae28d
Fast-forward
 MLBozMkaaygAAyEjBRrB.txt | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 MLBozMkaaygAAyEjBRrB.txt
{3} git_machete.tests.functional.test_machete.MacheteTester.test_go_next_successor_exists [0.333110s] ... ok
{5} git_machete.tests.functional.test_machete.MacheteTester.test_advance_with_one_downstream_branch [0.385899s] ... ok
{1} git_machete.tests.functional.test_machete.MacheteTester.test_show_down [0.204634s] ... ok
{2} git_machete.tests.functional.test_machete.MacheteTester.test_go_last [0.411752s] ... ok
{3} git_machete.tests.functional.test_machete.MacheteTester.test_help [0.242992s] ... ok
{2} git_machete.tests.functional.test_machete.MacheteTester.test_show_next [0.238730s] ... ok
{1} git_machete.tests.functional.test_machete.MacheteTester.test_show_first [0.358026s] ... ok
From /tmp/tmp.QUTv4kkYRC
 * [new branch]      chore/sync_to_docs      -> origin/chore/sync_to_docs
 * [new branch]      comments/add_docstrings -> origin/comments/add_docstrings
 * [new branch]      develop                 -> origin/develop
 * [new branch]      improve/refactor        -> origin/improve/refactor
Switched to a new branch 'chore/sync_to_docs'
Branch 'chore/sync_to_docs' set up to track remote branch 'chore/sync_to_docs' from 'origin'.
Switched to a new branch 'improve/refactor'
Branch 'improve/refactor' set up to track remote branch 'improve/refactor' from 'origin'.
Switched to a new branch 'comments/add_docstrings'
Branch 'comments/add_docstrings' set up to track remote branch 'comments/add_docstrings' from 'origin'.
{5} git_machete.tests.functional.test_machete.MacheteTester.test_checkout_prs_freshly_cloned [0.527865s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 2072, in test_checkout_prs_freshly_cloned
    self.assert_command(

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 292, in assert_command
    self.assertEqual(self.launch_command(*cmds), self.adapt(expected_result) if strip_indentation else expected_result)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 386, in launch
    machete_client.checkout_github_prs(pr_no)

      File "/home/plipski/git-machete/git_machete/client.py", line 1695, in checkout_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

{3} git_machete.tests.functional.test_machete.MacheteTester.test_retarget_pr [0.384042s] ... ok
Switched to a new branch 'bugfix/feature'
Branch 'bugfix/feature' set up to track remote branch 'bugfix/feature' from 'origin'.
Switched to a new branch 'allow-ownership-link'
Branch 'allow-ownership-link' set up to track remote branch 'allow-ownership-link' from 'origin'.
Switched to a new branch 'restrict_access'
Branch 'restrict_access' set up to track remote branch 'restrict_access' from 'origin'.
Switched to a new branch 'chore/redundant_checks'
Branch 'chore/redundant_checks' set up to track remote branch 'chore/redundant_checks' from 'origin'.
{6} git_machete.tests.functional.test_machete.MacheteTester.test_checkout_prs [0.951403s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1912, in test_checkout_prs
    self.launch_command('github', 'checkout-prs', '18')

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 386, in launch
    machete_client.checkout_github_prs(pr_no)

      File "/home/plipski/git-machete/git_machete/client.py", line 1695, in checkout_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

{6} git_machete.tests.functional.test_machete.MacheteTester.test_go_first_root_without_downstream [0.091459s] ... ok
{6} git_machete.tests.functional.test_machete.MacheteTester.test_go_root [0.214938s] ... ok
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 248 bytes | 248.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.s8BO8klI5t
   516cc43..232968a  call-ws -> call-ws
Branch 'call-ws' set up to track remote branch 'call-ws' from 'origin'.
{7} git_machete.tests.functional.test_machete.MacheteTester.test_anno_prs [1.726325s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1650, in test_anno_prs
    self.launch_command('github', 'anno-prs')

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 377, in launch
    machete_client.sync_annotations_to_github_prs()

      File "/home/plipski/git-machete/git_machete/client.py", line 1287, in sync_annotations_to_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

{4} git_machete.tests.functional.test_machete.MacheteTester.test_github_create_pr [1.896219s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1723, in test_github_create_pr
    self.launch_command("github", "create-pr")

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 390, in launch
    machete_client.create_github_pr(current_branch, draft=cli_opts.opt_draft)

      File "/home/plipski/git-machete/git_machete/client.py", line 1770, in create_github_pr
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

First, rewinding head to replay your work on top of it...
Applying: Allow ownership links
Applying: 1st round of fixes
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 456 bytes | 456.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To /tmp/tmp.Ethz8aH1iX
 + 872c8ce...8fe8adf allow-ownership-link -> allow-ownership-link (forced update)
Branch 'allow-ownership-link' set up to track remote branch 'allow-ownership-link' from 'origin'.
{7} git_machete.tests.functional.test_machete.MacheteTester.test_go_down [0.163556s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Build arbitrarily long chains
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 264 bytes | 264.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.Ethz8aH1iX
 * [new branch]      build-chain -> build-chain
Branch 'build-chain' set up to track remote branch 'build-chain' from 'origin'.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 247 bytes | 247.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.Ethz8aH1iX
   a72e4fe..963243b  call-ws -> call-ws
Branch 'call-ws' set up to track remote branch 'call-ws' from 'origin'.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 314 bytes | 314.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To /tmp/tmp.IrBieE9OBD
   cb28f25..98a06bb  develop -> develop
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
First, rewinding head to replay your work on top of it...
Applying: Drop unneeded SQL constraints
First, rewinding head to replay your work on top of it...
Applying: child_1
Applying: child_2
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 266 bytes | 266.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.Ethz8aH1iX
 * [new branch]      drop-constraint -> drop-constraint
Branch 'drop-constraint' set up to track remote branch 'drop-constraint' from 'origin'.
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 429 bytes | 429.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
{4} git_machete.tests.functional.test_machete.MacheteTester.test_go_first_root_with_downstream [0.421663s] ... ok
To /tmp/tmp.IrBieE9OBD
 + ed44f05...ab7edc5 child -> child (forced update)
Branch 'child' set up to track remote branch 'child' from 'origin'.
{7} git_machete.tests.functional.test_machete.MacheteTester.test_show_root [0.342705s] ... ok
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/tmp.Ethz8aH1iX
 + e8b147f...e86e29d hotfix/add-trigger -> hotfix/add-trigger (forced update)
Branch 'hotfix/add-trigger' set up to track remote branch 'hotfix/add-trigger' from 'origin'.
{4} git_machete.tests.functional.test_machete.MacheteTester.test_go_next_successor_on_another_root_tree [0.270703s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Allow ownership links
Applying: 1st round of fixes
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 459 bytes | 459.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To /tmp/tmp.74PeNhJV9G
 + 5f2e6eb...78685c5 allow-ownership-link -> allow-ownership-link (forced update)
Branch 'allow-ownership-link' set up to track remote branch 'allow-ownership-link' from 'origin'.
{5} git_machete.tests.functional.test_machete.MacheteTester.test_show [1.802796s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Allow ownership links
Applying: 1st round of fixes
Updating 98a06bb..4280840
Fast-forward
 UARcUeRaPxJeJnYJAtsU.txt | 0
 kfhqufwnGZXCHzGWfNhS.txt | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 UARcUeRaPxJeJnYJAtsU.txt
 create mode 100644 kfhqufwnGZXCHzGWfNhS.txt
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
First, rewinding head to replay your work on top of it...
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 452 bytes | 452.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
Applying: Build arbitrarily long chains
To /tmp/tmp.2nUwhjJxKz
 + ea0b563...e91ab43 allow-ownership-link -> allow-ownership-link (forced update)
Branch 'allow-ownership-link' set up to track remote branch 'allow-ownership-link' from 'origin'.
{4} git_machete.tests.functional.test_machete.MacheteTester.test_go_prev_successor_exists [0.346634s] ... ok
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 248 bytes | 248.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
First, rewinding head to replay your work on top of it...
To /tmp/tmp.74PeNhJV9G
   ec8af3c..9b2ed6f  call-ws -> call-ws
Branch 'call-ws' set up to track remote branch 'call-ws' from 'origin'.
Applying: Build arbitrarily long chains
{6} git_machete.tests.functional.test_machete.MacheteTester.test_squash_merge [1.405754s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Allow ownership links
Applying: 1st round of fixes
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 256 bytes | 256.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.2nUwhjJxKz
 * [new branch]      build-chain -> build-chain
Branch 'build-chain' set up to track remote branch 'build-chain' from 'origin'.
First, rewinding head to replay your work on top of it...
Applying: Drop unneeded SQL constraints
First, rewinding head to replay your work on top of it...
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 252 bytes | 252.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
Applying: Build arbitrarily long chains
{5} git_machete.tests.functional.test_machete.MacheteTester.test_show_last [0.419183s] ... ok
To /tmp/tmp.2nUwhjJxKz
   c2249ab..8a5df96  call-ws -> call-ws
Branch 'call-ws' set up to track remote branch 'call-ws' from 'origin'.
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/tmp.74PeNhJV9G
 + 1a01588...c0099fa hotfix/add-trigger -> hotfix/add-trigger (forced update)
Branch 'hotfix/add-trigger' set up to track remote branch 'hotfix/add-trigger' from 'origin'.
First, rewinding head to replay your work on top of it...
Applying: Drop unneeded SQL constraints
{0} git_machete.tests.functional.test_machete.MacheteTester.test_discover_traverse_squash [3.269712s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Drop unneeded SQL constraints
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 261 bytes | 261.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
First, rewinding head to replay your work on top of it...
To /tmp/tmp.2nUwhjJxKz
 * [new branch]      drop-constraint -> drop-constraint
Branch 'drop-constraint' set up to track remote branch 'drop-constraint' from 'origin'.
Applying: child_d_1
First, rewinding head to replay your work on top of it...
Applying: Only level-1 commit.
{4} git_machete.tests.functional.test_machete.MacheteTester.test_update_with_fork_point_not_specified [0.444390s] ... ok
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/tmp.2nUwhjJxKz
 + 333de63...bc08120 hotfix/add-trigger -> hotfix/add-trigger (forced update)
Branch 'hotfix/add-trigger' set up to track remote branch 'hotfix/add-trigger' from 'origin'.
{5} git_machete.tests.functional.test_machete.MacheteTester.test_show_prev [0.312934s] ... ok
{0} git_machete.tests.functional.test_machete.MacheteTester.test_go_prev_successor_on_another_root_tree [0.290927s] ... ok
{2} git_machete.tests.functional.test_machete.MacheteTester.test_traverse_no_push_untracked [2.960613s] ... ok
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 249 bytes | 249.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.1uXmy6zQZM
 + 5ade05c...5f4c801 child_d -> child_d (forced update)
Branch 'child_d' set up to track remote branch 'child_d' from 'origin'.
{5} git_machete.tests.functional.test_machete.MacheteTester.test_show_up [0.254066s] ... ok
{3} git_machete.tests.functional.test_machete.MacheteTester.test_traverse_no_push [2.704460s] ... ok
First, rewinding head to replay your work on top of it...
Applying: Third commit on branch.
{1} git_machete.tests.functional.test_machete.MacheteTester.test_traverse_no_push_override [3.046439s] ... ok
{4} git_machete.tests.functional.test_machete.MacheteTester.test_update_with_fork_point_specified [0.454137s] ... ok
First, rewinding head to replay your work on top of it...
Applying: child_a_1
First, rewinding head to replay your work on top of it...
Applying: child_b_1
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 269 bytes | 269.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To /tmp/tmp.1uXmy6zQZM
 + 8d3e2c2...d5adc6f child_a -> child_a (forced update)
Branch 'child_a' set up to track remote branch 'child_a' from 'origin'.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 268 bytes | 268.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To /tmp/tmp.1uXmy6zQZM
 + 4b57903...506d02e child_b -> child_b (forced update)
Branch 'child_b' set up to track remote branch 'child_b' from 'origin'.
First, rewinding head to replay your work on top of it...
Applying: child_d_1
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 245 bytes | 245.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/tmp.1uXmy6zQZM
 + 5f4c801...74625a6 child_d -> child_d (forced update)
Branch 'child_d' set up to track remote branch 'child_d' from 'origin'.
{7} git_machete.tests.functional.test_machete.MacheteTester.test_slide_out [1.930475s] ... ok

==============================
Failed 4 tests - output below:
==============================

git_machete.tests.functional.test_machete.MacheteTester.test_checkout_prs_freshly_cloned
----------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 2072, in test_checkout_prs_freshly_cloned
    self.assert_command(

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 292, in assert_command
    self.assertEqual(self.launch_command(*cmds), self.adapt(expected_result) if strip_indentation else expected_result)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 386, in launch
    machete_client.checkout_github_prs(pr_no)

      File "/home/plipski/git-machete/git_machete/client.py", line 1695, in checkout_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

git_machete.tests.functional.test_machete.MacheteTester.test_checkout_prs
-------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1912, in test_checkout_prs
    self.launch_command('github', 'checkout-prs', '18')

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 386, in launch
    machete_client.checkout_github_prs(pr_no)

      File "/home/plipski/git-machete/git_machete/client.py", line 1695, in checkout_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

git_machete.tests.functional.test_machete.MacheteTester.test_anno_prs
---------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1650, in test_anno_prs
    self.launch_command('github', 'anno-prs')

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 377, in launch
    machete_client.sync_annotations_to_github_prs()

      File "/home/plipski/git-machete/git_machete/client.py", line 1287, in sync_annotations_to_github_prs
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

git_machete.tests.functional.test_machete.MacheteTester.test_github_create_pr
-----------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 1723, in test_github_create_pr
    self.launch_command("github", "create-pr")

      File "/home/plipski/git-machete/git_machete/tests/functional/test_machete.py", line 281, in launch_command
    cli.launch(list(args))

      File "/home/plipski/git-machete/git_machete/cli.py", line 390, in launch
    machete_client.create_github_pr(current_branch, draft=cli_opts.opt_draft)

      File "/home/plipski/git-machete/git_machete/client.py", line 1770, in create_github_pr
    current_user: Optional[str] = derive_current_user_login()

      File "/home/plipski/git-machete/git_machete/github.py", line 214, in derive_current_user_login
    return str(user['login'])  # str() to satisfy mypy

    TypeError: list indices must be integers or slices, not str

======
Totals
======
Ran: 36 tests in 4.3349 sec.
 - Passed: 32
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 4
Sum of execute time for each test: 29.5186 sec.

==============
Worker Balance
==============
 - Worker 0 (2 tests) => 0:00:03.561178
 - Worker 1 (4 tests) => 0:00:03.814727
 - Worker 2 (3 tests) => 0:00:03.611966
 - Worker 3 (5 tests) => 0:00:03.724194
 - Worker 4 (6 tests) => 0:00:03.838887
 - Worker 5 (6 tests) => 0:00:03.707329
 - Worker 6 (5 tests) => 0:00:02.972840
 - Worker 7 (5 tests) => 0:00:04.310773
ERROR: InvocationError for command /home/plipski/git-machete/.tox/py39/bin/stestr run (exited with code 1)
__________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR:   py39: commands failed
rifel123 commented 2 years ago

closed with #247