Wing Pytest Invalid Argument Error?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Wing Pytest Invalid Argument Error?

WingIDE - User mailing list
Trying to run a py.test unit test, and now getting an argument error.
I was running tests fine early last week, and now I am seeing this strange argument error. I think it could be environment related, but I'm not sure what to change. Hopefully I am including enough information in this post, but please ask if I am not.

1. I have setup a project in Wing and used files that I checked out from my companies git repository.
2. I setup the default testing framework in the project properties to pytest.
3. I open the file I want to run test in, in Wing, and then I select 'add current file' from the testing menu option at the top of wing.
4. In the testing tab of the debug area at the bottom of wing IDE, I right mouse click on the newly added filename and choose 'debug test' from the popup menu.
5. I now get a pytest assertion error in main.py.

File "C:\Program Files (x86)\Wing IDE 5.1\src\testing\runners\run_pytest_xml.py", line 353, in <module>
  main(list(sys.argv))
File "C:\Program Files (x86)\Wing IDE 5.1\src\testing\runners\run_pytest_xml.py", line 312, in main
  RunInSingleDir(module_names, xmlout, module_dir)
File "C:\Program Files (x86)\Wing IDE 5.1\src\testing\runners\run_pytest_xml.py", line 344, in RunInSingleDir
  pytest.main(args=['-s', '-p', 'no:terminal', '--tb=native'] + module_fullpath_list, plugins=[plugin])
File "C:\Python27\Lib\site-packages\_pytest\config.py", line 41, in main
  return config.hook.pytest_cmdline_main(config=config)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 413, in __call__
  return self._docall(methods, kwargs)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 424, in _docall
  res = mc.execute()
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 315, in execute
  res = method(**kwargs)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 116, in pytest_cmdline_main
  return wrap_session(config, _main)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 84, in wrap_session
  doit(config, session)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 121, in _main
  config.hook.pytest_collection(session=session)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 413, in __call__
  return self._docall(methods, kwargs)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 424, in _docall
  res = mc.execute()
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 315, in execute
  res = method(**kwargs)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 125, in pytest_collection
  return session.perform_collect()
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 545, in perform_collect
  items = self._perform_collect(args, genitems)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 565, in _perform_collect
  rep = collect_one_node(self)
File "C:\Python27\Lib\site-packages\_pytest\runner.py", line 401, in collect_one_node
  rep = ihook.pytest_make_collect_report(collector=collector)
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 166, in call_matching_hooks
  return hookmethod.pcall(plugins, **kwargs)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 417, in pcall
  return self._docall(methods, kwargs)
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 424, in _docall
  res = mc.execute()
File "C:\Python27\Lib\site-packages\_pytest\core.py", line 315, in execute
  res = method(**kwargs)
File "C:\Python27\Lib\site-packages\_pytest\runner.py", line 273, in pytest_make_collect_report
  call = CallInfo(collector._memocollect, "memocollect")
File "C:\Python27\Lib\site-packages\_pytest\runner.py", line 139, in __init__
  self.result = func()
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 438, in _memocollect
  return self._memoizedcall('_collected', lambda: list(self.collect()))
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 315, in _memoizedcall
  res = function()
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 438, in <lambda>
  return self._memoizedcall('_collected', lambda: list(self.collect()))
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 589, in collect
  for x in self._collect(arg):
File "C:\Python27\Lib\site-packages\_pytest\main.py", line 602, in _collect
  assert not names, "invalid arg %r" %(arg,)

_pytest.assertion.reinterpret.AssertionError: invalid arg 'c:\\Turtle\\test-automation::web_driver::tests::<compnay>::<company>_submission_tests'

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wing Pytest Invalid Argument Error?

WingIDE - User mailing list
Karl Chester via wingide-users wrote:

> Trying to run a py.test unit test, and now getting an argument error.
> I was running tests fine early last week, and now I am seeing this
> strange argument error. I think it could be environment related, but
> I'm not sure what to change. Hopefully I am including enough
> information in this post, but please ask if I am not.
>
> 1. I have setup a project in Wing and used files that I checked out
> from my companies git repository.
> 2. I setup the default testing framework in the project properties to
> pytest.
> 3. I open the file I want to run test in, in Wing, and then I select
> 'add current file' from the testing menu option at the top of wing.
> 4. In the testing tab of the debug area at the bottom of wing IDE, I
> right mouse click on the newly added filename and choose 'debug test'
> from the popup menu.
> 5. I now get a pytest assertion error in main.py.

What version of pytest is this?  It seems to be having problems parsing
the command line args we set up in the 3rd stack frame (in
RunInSingleDir), although the mis-spelled "<compnay>" in the invalid arg
it's complaining about may be a clue as well.

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com


_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wing Pytest Invalid Argument Error?

WingIDE - User mailing list

I added the <company> portion due to my interest in hiding the company name I work for.
Pytest version is 2.6.1


Here is the output from pip freeze

apipkg==1.4
Appium-Python-Client==0.17
colorama==0.3.3
enum==0.4.4
enum34==1.0.4
execnet==1.4.0
httplib2==0.9.1
Nuitka32==5.1.134
oauth2==1.5.211
oauthlib==1.0.3
py==1.4.30
pycurl==7.19.5.1
pytest==2.6.1
pytest-xdist==1.10
python-dateutil==2.2
requests==2.3.0
requests-oauthlib==0.4.2
selenium==2.47.1
six==1.9.0
urllib3==1.11

---------------
Karl Chester Jr

> Date: Tue, 25 Aug 2015 12:51:14 -0400

> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
> Subject: Re: [wingide-users] Wing Pytest Invalid Argument Error?
>
> Karl Chester via wingide-users wrote:
> > Trying to run a py.test unit test, and now getting an argument error.
> > I was running tests fine early last week, and now I am seeing this
> > strange argument error. I think it could be environment related, but
> > I'm not sure what to change. Hopefully I am including enough
> > information in this post, but please ask if I am not.
> >
> > 1. I have setup a project in Wing and used files that I checked out
> > from my companies git repository.
> > 2. I setup the default testing framework in the project properties to
> > pytest.
> > 3. I open the file I want to run test in, in Wing, and then I select
> > 'add current file' from the testing menu option at the top of wing.
> > 4. In the testing tab of the debug area at the bottom of wing IDE, I
> > right mouse click on the newly added filename and choose 'debug test'
> > from the popup menu.
> > 5. I now get a pytest assertion error in main.py.
>
> What version of pytest is this? It seems to be having problems parsing
> the command line args we set up in the 3rd stack frame (in
> RunInSingleDir), although the mis-spelled "<compnay>" in the invalid arg
> it's complaining about may be a clue as well.
>
> --
>
> Stephan Deibel
> Wingware | Python IDE
>
> The Intelligent Development Environment for Python Programmers
>
> wingware.com
>
>

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wing Pytest Invalid Argument Error?

WingIDE - User mailing list
Karl Chester via wingide-users wrote:
> I added the <company> portion due to my interest in hiding the company
> name I work for.
> Pytest version is 2.6.1

I've been testing with 2.6.4... I wonder if 2.6.1 is missing support for
either the '-s' or '-p no:terminal' command line options.

Can you try debugging again, go up the stack to RunInSingleDir() (3rd
stack frame) and edit that line to remove "'-s', '-p', 'no:terminal',"
(so only "--tb=native" remains) to see if that solves it?

Then try debugging again to see if that stops happening.

This is something that changed in Wing 5.1.6 so it's a possibility that
upgrading was what broke things for you.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...