Pytest -m connection

what should be the result of that command

If your setup is wrong it will print some error message.

If you do not have an error message you may processed with the next step.

thanks,
I’ve several errors. The first one is:
File “C:\Users<my-user-name>\AppData\Roaming\Python\Python37\site-packages\pluggy_init_.py”, line 397, in load_setuptools_entrypoints
plugin = ep.load()

Any suggestions?

Thanks

Have you setup your .ini file as indicated. Please share its content.

Thanks,
Here is my .ini file

Ticket: Connection

Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-xxxxx.mongodb.net/test?retryWrites=true&w=majority
MFLIX_NS = sample_mflix

[TEST]
SECRET_KEY = super_secret_testing_key
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-xxxxx.mongodb.net/test?retryWrites=true&w=majority
MFLIX_NS = sample_mflix

Share a full screenshot of the command and the subsequent stack trace.

Thanks a lot for your help, I send the command + the whole response, as I understood that this is what you want to see

D:\dotnet\MongoDb\Courses\M220p\mflix-python>pytest -m connection
Traceback (most recent call last):
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy_init_.py”, line 397, in load_setuptools_entrypoints
plugin = ep.load()
File “C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 2444, in load
self.require(*args, **kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 2467, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File “C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (attrs 19.1.0 (c:\programdata\anaconda3\lib\site-packages), Requirement.parse(‘attrs>=19.2.0’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\Scripts\pytest-script.py”, line 10, in
sys.exit(main())
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\config.py”, line 50, in main
config = _prepareconfig(args, plugins)
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\config.py”, line 160, in prepareconfig
pluginmanager=pluginmanager, args=args)
File "C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy_init
.py", line 617, in call
return self._hookexec(self, self._nonwrappers + self.wrappers, kwargs)
File "C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy_init
.py", line 222, in _hookexec
return self.inner_hookexec(hook, methods, kwargs)
File "C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy_init
.py", line 216, in
firstresult=hook.spec_opts.get(‘firstresult’),
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy\callers.py”, line 196, in _multicall
gen.send(outcome)
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\helpconfig.py”, line 68, in pytest_cmdline_parse
config = outcome.get_result()
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy\callers.py”, line 76, in get_result
raise ex[1].with_traceback(ex[2])
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy\callers.py”, line 180, in _multicall
res = hook_impl.function(*args)
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\config.py”, line 942, in pytest_cmdline_parse
self.parse(args)
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\config.py”, line 1107, in parse
self._preparse(args, addopts=addopts)
File “C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages_pytest\config.py”, line 1070, in preparse
self.pluginmanager.load_setuptools_entrypoints(‘pytest11’)
File "C:\Users\itzhak.kagan\AppData\Roaming\Python\Python37\site-packages\pluggy_init
.py", line 402, in load_setuptools_entrypoints
“Plugin %r could not be loaded: %s!” % (ep.name, e))
pluggy.PluginValidationError: Plugin ‘hypothesispytest’ could not be loaded: (attrs 19.1.0 (c:\programdata\anaconda3\lib\site-packages), Requirement.parse(‘attrs>=19.2.0’))!

Yes, but I did say as a screenshot.

Run this command and send a screenshot of the output:
pip list | findstr /RI "attrs hypothesis pytest flask"

Thanks, sorry about that. Here is the screen shot
Hope it will be upload ok

Suggest you downgrade hypothesis:
pip install hypothesis==4.38.1

Thanks , Here is the screen shot of the installation
Is that OK?

0.7.0 for pytest-astropy

Thanks again, I did not understood what you mean. Should I run “pytest-astropy” command?

Install version 0.7.0 of pytest-astropy using pip

Thanks, I run the command “pip install pytest-astropy==0.7.0” and it was successfully installed.
Then I run “pytest -m connection”. Here is the result. Is it a desired result?

100% - looks good!

Thanks a lot for your help and for your patience, I really appreciate it !!!

:slightly_smiling_face: :+1: