[py-dev] [hpk42/pytest] a really large argument string will throw py.error.ENAMETOOLONG (issue #224)

Anonymous issues-reply at bitbucket.org
Sun Nov 11 18:19:52 CET 2012


--- you can reply above this line ---

New issue 224: a really large argument string will throw py.error.ENAMETOOLONG
https://bitbucket.org/hpk42/pytest/issue/224/a-really-large-argument-string-will-throw

Anonymous:

If you call py.test with something nefarious like this, config.py/getcfg() throws py.error.ENAMETOOLONG because it tries to make a file path from each command argument.

py.test -m "flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py or flyingmonkey1.py" scripts/

I'm not sure if 'right' solution is to just not do this, or to catch this particular exception.

try:
    if p.check():
        # the rest of things
except py.error.ENAMETOOLONG:
    continue



--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.



More information about the Pytest-dev mailing list