Tox.ini is incompatible with tox 1.7.0

Bug #1280620 reported by Pavlo Shchelokovskyy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Victor Howard

Bug Description

Tox 1.7.0 was released recently. As heat does not has tox in it's test-requirements.txt, I just pip-installed the latest one, and now can not run `tox` command to run any tests, as the following error is produced:
Traceback (most recent call last):
  File "/home/pshchelo/.virtualenvs/heat/bin/tox", line 9, in <module>
    load_entry_point('tox==1.7.0', 'console_scripts', 'tox')()
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_cmdline.py", line 25, in main
    config = parseconfig(args, 'tox')
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 47, in parseconfig
    parseini(config, inipath)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 281, in __init__
    config)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 346, in _makeenvconfig
    vc.commands = reader.getargvlist(section, "commands")
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 518, in getargvlist
    commandlist.append(self._processcommand(current_command))
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 550, in _processcommand
    new_word = self._replace(word)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 666, in _replace
    return RE_ITEM_REF.sub(self._replace_match, x)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 662, in _replace_match
    return handler(match)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 633, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/home/pshchelo/.virtualenvs/heat/local/lib/python2.7/site-packages/tox/_config.py", line 627, in _substitute_from_other_section
    "substitution key %r not found" % key)
tox.ConfigError: ConfigError: substitution key 'posargs' not found

When I downgraded tox to 1.6.1, the error was gone, and I could run the tests again.

As we have tox.ini in the repo, I think we should add tox to test-requirements.txt and either pin the version to 1.6.1 or pin it to >=1.7.0 and fix the above error.

Changed in heat:
assignee: nobody → Victor Howard (victor-r-howard)
Revision history for this message
Wei Wang (damon-devops) wrote :

many projects now are incompatible with tox 1.7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.