Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-481

Upgrade pytest to 3.5.1



    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:


      In order to address aid in addressing issues in DM-11693 (namely rerunning passed tests at scons install time), we need to first upgrade to a the 3.5 minor release of pytest, which supports the --lfnf= flag.


      A list of deprecations and removals since our current version of pytest (3.2.0) that are relevant to our python version (3.6) is provided below. It's not likely any of these affect us, since we are mostly using pytest to run tests only.

      • pytest.approx no longer supports >, >=, < and <= operators to avoid surprising/inconsistent behavior. See the approx docs for more information. (#2003)
      • A deprecation warning is now raised when using marks for parameters in pytest.mark.parametrize. Use pytest.param to apply marks to parameters instead. (#2427)
      • Remove internal _preloadplugins() function. This removal is part of the pytest_namespace() hook deprecation. (#2636)
      • Internally change CallSpec2 to have a list of marks instead of a broken mapping of keywords. This removes the keywords attribute of the internal CallSpec2 class. (#2672)
      • The params list passed to pytest.fixture is now for all effects considered immutable and frozen at the moment of the pytest.fixture call. Previously the list could be changed before the first invocation of the fixture allowing for a form of dynamic parametrization (for example, updated from command-line options), but this was an unwanted implementation detail which complicated the internals and prevented some internal cleanup. See issue #2959 for details and a recommended workaround.
      • All pytest classes now subclass object for better Python 2/3 compatibility. This should not affect user code except in very rare edge cases. (#2147)
      • record_xml_property fixture is now deprecated in favor of the more generic record_property. (#2770)
      • Defining pytest_plugins is now deprecated in non-top-level conftest.py files, because they “leak” to the entire directory tree. (#3084)


          Issue Links


            bvan Brian Van Klaveren created issue -
            bvan Brian Van Klaveren made changes -
            Field Original Value New Value
            Link This issue relates to DM-11693 [ DM-11693 ]
            bvan Brian Van Klaveren made changes -
            Risk Score 0
            bvan Brian Van Klaveren made changes -
            Status Proposed [ 10805 ] Adopted [ 10806 ]
            Parejkoj John Parejko made changes -
            Link This issue is triggering DM-14589 [ DM-14589 ]
            ktl Kian-Tat Lim made changes -
            Link This issue is triggering DM-15701 [ DM-15701 ]
            bvan Brian Van Klaveren made changes -
            Resolution Done [ 10000 ]
            Status Adopted [ 10806 ] Implemented [ 11105 ]


              bvan Brian Van Klaveren
              bvan Brian Van Klaveren
              Brian Van Klaveren, Heather Kelly, John Swinbank, Russell Owen, Tim Jenness
              0 Vote for this issue
              5 Start watching this issue


                Planned End: