[Pytest-commit] [pytest-dev/pytest] 1654b7: [#3191] Set up tests to confirm warnings

Bruno Oliveira nicoddemus at gmail.com
Wed Dec 5 17:04:55 EST 2018


  Branch: refs/heads/features
  Home:   https://github.com/pytest-dev/pytest
  Commit: 1654b77ca0febbe047a56cdce59e14755064b3e6
      https://github.com/pytest-dev/pytest/commit/1654b77ca0febbe047a56cdce59e14755064b3e6
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M testing/test_warnings.py

  Log Message:
  -----------
  [#3191] Set up tests to confirm warnings


  Commit: 9fc9b2926f35915b6e7fd9bebe1855e47554db04
      https://github.com/pytest-dev/pytest/commit/9fc9b2926f35915b6e7fd9bebe1855e47554db04
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M testing/test_warnings.py

  Log Message:
  -----------
  Fix tests and add aditional cases

As requested by review.

:ok_hand: Address code review for tests


  Commit: 59a11b6a5d4e9a93eba71c39b9f523e2b8380f39
      https://github.com/pytest-dev/pytest/commit/59a11b6a5d4e9a93eba71c39b9f523e2b8380f39
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M src/_pytest/assertion/rewrite.py

  Log Message:
  -----------
  Check for 'assert None' and warn appropriately

:bug:Fix warn ast bugs

:bug:Fix inner-ast imports by using importFrom

Alternetavly ast_call_helper could be retooled to use ast.attribute(...)


  Commit: e0c2ab19017d38cd957b96aff873e6fe97acbeef
      https://github.com/pytest-dev/pytest/commit/e0c2ab19017d38cd957b96aff873e6fe97acbeef
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M testing/test_warnings.py

  Log Message:
  -----------
  Fix tests not to assert a function that already asserts

Maybe there should be a warning about that too?


  Commit: aaf7f7fcca0721941b8633e190065759818fd5ea
      https://github.com/pytest-dev/pytest/commit/aaf7f7fcca0721941b8633e190065759818fd5ea
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    A changelog/3191.feature.rst

  Log Message:
  -----------
  Update changelog


  Commit: 3e6f1fa2db20eb2fd751a778dc42dd126a9e778d
      https://github.com/pytest-dev/pytest/commit/3e6f1fa2db20eb2fd751a778dc42dd126a9e778d
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M src/_pytest/assertion/rewrite.py

  Log Message:
  -----------
  Simplify warning creation by using ast.parse

in py2 it's a ast.Name where in py3 it's a ast.NamedConstant

Fixes namespace by using import from


  Commit: 26d27df6fce16904ed9fb27e27e16dc9620d9569
      https://github.com/pytest-dev/pytest/commit/26d27df6fce16904ed9fb27e27e16dc9620d9569
  Author: Bruno Oliveira <nicoddemus at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M changelog/3191.feature.rst

  Log Message:
  -----------
  Improve changelog message


  Commit: e1e4b226c6aa7ea81bf18eb192a6f979275d7097
      https://github.com/pytest-dev/pytest/commit/e1e4b226c6aa7ea81bf18eb192a6f979275d7097
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M changelog/3191.feature.rst
    M src/_pytest/assertion/rewrite.py
    M testing/test_warnings.py

  Log Message:
  -----------
  :ok_hand: Address code review

Edited the changelog for extra clarity, and to fire off auto-formatting

Oddly enough, keeping `filename='{filename!r}'` caused an error while
collecting tests, but getting rid of the single ticks fixed it
Hopefully closes #3191


  Commit: 41031fce2fc64d36abfbbf5b140325759af94383
      https://github.com/pytest-dev/pytest/commit/41031fce2fc64d36abfbbf5b140325759af94383
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M changelog/3191.feature.rst
    M src/_pytest/assertion/rewrite.py

  Log Message:
  -----------
  Address code review


  Commit: 7a7ad0c12076f5dad281bbac064b95ba48dfb24e
      https://github.com/pytest-dev/pytest/commit/7a7ad0c12076f5dad281bbac064b95ba48dfb24e
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M src/_pytest/assertion/rewrite.py

  Log Message:
  -----------
  Shorten docstring for warn_about_none_ast


  Commit: 8fd60483efec91cdf410afc54ce9a95d76a8a2c9
      https://github.com/pytest-dev/pytest/commit/8fd60483efec91cdf410afc54ce9a95d76a8a2c9
  Author: Tomer Keren <tomer.keren.dev at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M src/_pytest/assertion/rewrite.py

  Log Message:
  -----------
  Don't insert warnings when not in a module


  Commit: 8a0ed7e2b33a33f29f81314dce587d05c6425c0a
      https://github.com/pytest-dev/pytest/commit/8a0ed7e2b33a33f29f81314dce587d05c6425c0a
  Author: Daniel Hahler <github at thequod.de>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M changelog/3191.feature.rst

  Log Message:
  -----------
  Revisit changelog entry  [ci skip]


  Commit: 5ebacc49c630178413a38deb6e344fc07f284be3
      https://github.com/pytest-dev/pytest/commit/5ebacc49c630178413a38deb6e344fc07f284be3
  Author: Daniel Hahler <git at thequod.de>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    M src/_pytest/assertion/rewrite.py
    M testing/test_warnings.py

  Log Message:
  -----------
  Harden tests, fix doc/msg


  Commit: 76884c73bf1ba0cd9fa5ed6e4ba65931fa38096d
      https://github.com/pytest-dev/pytest/commit/76884c73bf1ba0cd9fa5ed6e4ba65931fa38096d
  Author: Bruno Oliveira <nicoddemus at gmail.com>
  Date:   2018-12-05 (Wed, 05 Dec 2018)

  Changed paths:
    A changelog/3191.feature.rst
    M src/_pytest/assertion/rewrite.py
    M testing/test_warnings.py

  Log Message:
  -----------
  Merge pull request #4146 from Tadaboody/give_hints_when_an_assertion_value_is_None_instead_of_a_boolean_3191

[#3191] Give hints when an assertion value is None instead of a boolean


Compare: https://github.com/pytest-dev/pytest/compare/5db46d208709...76884c73bf1b
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the pytest-commit mailing list