boxed / hammett

Fast python test runner, compatible with a subset of pytest
BSD 3-Clause "New" or "Revised" License
79 stars 7 forks source link

TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' #12

Open jayvdb opened 3 years ago

jayvdb commented 3 years ago

I am not familiar with the inner workings of hammett. I am trying to get the 0.9.2 tests passing on the openSUSE builds. Build project at https://build.opensuse.org/package/show/home:jayvdb:branches:devel:languages:python/python-hammett

I can also reproduce the errors locally on Python 3.6 and Python 3.8, running with in very basic tox.ini to ensure there is no local packages causing problems.

Any hints would be appreciated.

> tox -e py36
py36 base interpreter: delegating to standard resolution
GLOB sdist-make: /home/jayvdb/projects/python/hammett/setup.py
py36 recreate: /home/jayvdb/.cache/tox/hammett/py36
py36 installdeps: -rrequirements.txt, dataclasses, pytest
py36 inst: /home/jayvdb/.cache/tox/hammett/.tmp/package/1/hammett-0.9.2.zip
py36 testmon: setting TESTMON_DATAFILE=/home/jayvdb/.cache/tox/hammett/py36/.testmondata
py36 installed: astunparse==1.6.3,attrs==20.3.0,dataclasses==0.8,hammett @ file:///home/jayvdb/.cache/tox/hammett/.tmp/package/1/hammett-0.9.2.zip,importlib-metadata==3.4.0,iniconfig==1.1.1,packaging==20.8,pluggy==0.13.1,py==1.10.0,pyparsing==2.4.7,pytest==6.2.2,six==1.15.0,toml==0.10.2,typing-extensions==3.7.4.3,zipp==3.4.0
py36 run-test-pre: PYTHONHASHSEED='2586296091'
py36 run-test: commands[0] | python -m unittest -v tests/test_analyze_assert.py tests/test_di.py tests/test_misc.py tests/test_suites.py
test_assert_feedback (tests.test_analyze_assert.RaiseTests) ... ok
test_feedback_for_exception (tests.test_analyze_assert.RaiseTests) ... ok
test_multi_big_variables (tests.test_analyze_assert.RaiseTests) ... ok
test_multi_line_assert (tests.test_analyze_assert.RaiseTests) ... ok
test_dependency_injection_simple (tests.test_di.DITests) ... {}
ok
test_di_does_not_call_unneeded_fixture (tests.test_di.DITests) ... {}
ok
test_di_graph (tests.test_di.DITests) ... {}
{'foo': 3}
{'foo': 3, 'bar': 4}
ok
test_di_unresolvable (tests.test_di.DITests) ... ok
test_auto_use_is_called_but_not_passed (tests.test_misc.FixtureDecoratorTests) ... {}
ok
test_simplest (tests.test_misc.FixtureDecoratorTests) ... ok
test_with_arg (tests.test_misc.FixtureDecoratorTests) ... ok
test_indent (tests.test_misc.MiscTests) ... ok
test_parse_markers (tests.test_misc.MiscTests) ... ok
test_pretty_format (tests.test_misc.MiscTests) ... ok
test_suites (tests.test_suites.SuitesTests) ... 
-------
suite suite_3_parametrize
g.results {'success': 0, 'failed': 5, 'skipped': 0, 'abort': 0}
asserts assert g.results == {'success': 5, 'failed': 0, 'skipped': 0, 'abort': 0}
exit_code 1
base /home/jayvdb/projects/python/hammett
output:
F

Failed: tests.test_foo.test_foo[foo=0]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=1]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=2]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=3]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=4]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

0 succeeded, 5 failed, 0 skipped

output detailed:
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=0]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=1]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=2]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=3]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=4]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('', '\n', False)
('\x1b[31m0 succeeded, 5 failed, 0 skipped\x1b[0m', '\n', False)
-------

======================================================================
FAIL: test_suites (tests.test_suites.SuitesTests) [suite_3_parametrize]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/tests/test_suites.py", line 27, in test_suites
    exec(asserts, {'g': g, 'exit_code': exit_code, 'base': base})
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/tests/test_suites.py", line 43, in test_suites
    assert False
AssertionError

----------------------------------------------------------------------
Ran 15 tests in 1.069s

FAILED (failures=1)
ERROR: InvocationError for command /home/jayvdb/.cache/tox/hammett/py36/bin/python -m unittest -v tests/test_analyze_assert.py tests/test_di.py tests/test_misc.py tests/test_suites.py (exited with code 1)
___________________________________________________________________ summary ___________________________________________________________________
ERROR:   py36: commands failed
tox -e py38
py38 base interpreter: delegating to standard resolution
GLOB sdist-make: /home/jayvdb/projects/python/hammett/setup.py
py38 inst-nodeps: /home/jayvdb/.cache/tox/hammett/.tmp/package/1/hammett-0.9.2.zip
py38 testmon: setting TESTMON_DATAFILE=/home/jayvdb/.cache/tox/hammett/py38/.testmondata
py38 installed: astunparse==1.6.3,attrs==20.3.0,hammett @ file:///home/jayvdb/.cache/tox/hammett/.tmp/package/1/hammett-0.9.2.zip,iniconfig==1.1.1,packaging==20.8,pluggy==0.13.1,py==1.10.0,pyparsing==2.4.7,pytest==6.2.2,six==1.15.0,toml==0.10.2
py38 run-test-pre: PYTHONHASHSEED='2033631481'
py38 run-test: commands[0] | python -m unittest -v tests/test_analyze_assert.py tests/test_di.py tests/test_misc.py tests/test_suites.py
test_assert_feedback (tests.test_analyze_assert.RaiseTests) ... ok
test_feedback_for_exception (tests.test_analyze_assert.RaiseTests) ... ok
test_multi_big_variables (tests.test_analyze_assert.RaiseTests) ... ok
test_multi_line_assert (tests.test_analyze_assert.RaiseTests) ... FAIL
test_dependency_injection_simple (tests.test_di.DITests) ... {}
ok
test_di_does_not_call_unneeded_fixture (tests.test_di.DITests) ... {}
ok
test_di_graph (tests.test_di.DITests) ... {}
{'foo': 3}
{'foo': 3, 'bar': 4}
ok
test_di_unresolvable (tests.test_di.DITests) ... ok
test_auto_use_is_called_but_not_passed (tests.test_misc.FixtureDecoratorTests) ... {}
ok
test_simplest (tests.test_misc.FixtureDecoratorTests) ... ok
test_with_arg (tests.test_misc.FixtureDecoratorTests) ... ok
test_indent (tests.test_misc.MiscTests) ... ok
test_parse_markers (tests.test_misc.MiscTests) ... ok
test_pretty_format (tests.test_misc.MiscTests) ... ok
test_suites (tests.test_suites.SuitesTests) ... 
-------
suite suite_3_parametrize
g.results {'success': 0, 'failed': 5, 'skipped': 0, 'abort': 0}
asserts assert g.results == {'success': 5, 'failed': 0, 'skipped': 0, 'abort': 0}
exit_code 1
base /home/jayvdb/projects/python/hammett
output:
F

Failed: tests.test_foo.test_foo[foo=0]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=1]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=2]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=3]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

F

Failed: tests.test_foo.test_foo[foo=4]
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test
    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection
    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))
  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func
    res = fixturefunc(**kwargs)
  File "tests/test_foo.py", line 11, in foo
    assert True
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

--- stdout ---
{}
{'bar': None}

0 succeeded, 5 failed, 0 skipped

output detailed:
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=0]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=1]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=2]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=3]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('\x1b[31mF\x1b[0m', '', True)
('\x1b[31m', '\n', False)
('', '\n', False)
('Failed: ', 'tests.test_foo.test_foo[foo=4]', False)
('', '\n', False)
('Traceback (most recent call last):\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 521, in run_test\n    resolved_function, resolved_kwargs = dependency_injection(_f, fixtures, request=req)\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 227, in dependency_injection\n    fully_resolved[name] = call_fixture_func(fixtures[name], request, pick_keys(fully_resolved, params))\n  File "/home/jayvdb/projects/python/hammett/hammett/impl.py", line 185, in call_fixture_func\n    res = fixturefunc(**kwargs)\n  File "tests/test_foo.py", line 11, in foo\n    assert True\nTypeError: unsupported operand type(s) for +: \'int\' and \'NoneType\'\n', '\n', False)
('', '\n', False)
('\x1b[33m', '\n', False)
('--- stdout ---', '\n', False)
("{}\n{'bar': None}\n", '\n', False)
('\x1b[0m', '\n', False)
('', '\n', False)
('\x1b[31m0 succeeded, 5 failed, 0 skipped\x1b[0m', '\n', False)
-------

======================================================================
FAIL: test_multi_line_assert (tests.test_analyze_assert.RaiseTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/tests/test_analyze_assert.py", line 79, in test_multi_line_assert
    assert strip_colors(output) == """--- Local variables ---
AssertionError: "--- Local variables ---\nlocal_5:\n    5\nlocal_foo:\n    'foo'\nFailed to analyze assert statement (SyntaxError)"

======================================================================
FAIL: test_suites (tests.test_suites.SuitesTests) [suite_3_parametrize]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/tests/test_suites.py", line 27, in test_suites
    exec(asserts, {'g': g, 'exit_code': exit_code, 'base': base})
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jayvdb/projects/python/hammett/tests/test_suites.py", line 43, in test_suites
    assert False
AssertionError

----------------------------------------------------------------------
Ran 15 tests in 0.516s

FAILED (failures=2)
..
boxed commented 3 years ago

This makes no sense to me either unfortunately. I've been thinking about that for a long time and it still stumps me.

jayvdb commented 3 years ago

Any suggestions on where I should put some debugging to help shed some light on where the problem is, or is not?

boxed commented 3 years ago

I've read through all of hammetts code now trying to see if there is any place there's a + that could possibly have an int on the left and None on the right, and I don't see how it's possible.

Is this the master code or the latest release btw? Maybe I'm reading the wrong code...