pytest-sugar | default look and feel of py.test ( e.g | Plugin library
kandi X-RAY | pytest-sugar Summary
kandi X-RAY | pytest-sugar Summary
a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the version string .
pytest-sugar Key Features
pytest-sugar Examples and Code Snippets
Community Discussions
Trending Discussions on pytest-sugar
QUESTION
I have installed pytest-sugar and tried to use it within VS Code Python (superb!) plugin. It works at terminal when using pytest command. Unfortunately on Python Test Log, it seems pytest-sugar cannot do its tricks. Had anyone else face the same? If so, how to overcome?
...ANSWER
Answered 2020-Apr-28 at 23:46Because of the tricks pytest-sugar does it requires a terminal, not the Output panel as the Python extension uses. There's also a potential issue from the extra output mucking with the pytest discovery code being used for test discovery.
Your best option is to turn off pytest-sugar when using pytest with VS Code. You can either do that by actively turning on the extension when you run at the terminal or turn it off explicitly in VS Code:
QUESTION
I am trying to install mysqlclient in virtrualenv on OSX high sierra, with python 3. And got the following error:
...ANSWER
Answered 2018-Dec-28 at 17:20I had the same issue after upgrading to osx Mojave, and on python 3.7.2. This is what worked for me:
QUESTION
I am running a Cookiecutter django project in a docker environment and I would like to add new packages via pip. Specifically I want to add: djangorestframework-jwt
When I do:
docker-compose -f local.yml run --rm django pip install
it seems like it would be perfectly working because I get:
Successfully installed PyJWT-1.7.1 djangorestframework-jwt-1.11.0
Now the problem is that it doesn't install it. It doesn't appear when I run pip freeze
, and also not in pip list
Then I tried to put it into my requirements.txt file and run it with:
docker-compose -f local.yml run --rm django pip install -r requirements/base.txt
Same result. It says that it is successfully installed but it is not. I thought it might be a problem with my django version and the package, but the same happens when I try to update my pip. It says it updated, but when I run pip install -upgrade pip
I get again:
You should consider upgrading via the 'pip install --upgrade pip' command.
I'm running out of options.
My requirements:
...ANSWER
Answered 2019-May-02 at 18:55docker-compose run
starts a new container and executes the command in it. When used with --rm
flag the container gets removed after command completes.
What happens is you get a new container created, and packages installed, or pip upgraded, inside this container. Once the command completes the container is removed.
If later on you run something like docker-compose -f local.yml run --rm pip list
a brand new container will get created and pip list executed inside it, showing no packages from previous run since they were installed in a different container, which is already removed.
A better way would be to create docker image
that includes your application and install pip packages during docker build. You can check a sample in this question
This way any time you start a container from your image it will have all packages inside.
QUESTION
I'm using tox
for my testing. Currently my tox.ini
defines several commands:
ANSWER
Answered 2019-Mar-20 at 19:41You can do simply:
QUESTION
In conftest.py
I am loading the module blueprint.Manifest
, which in turn loads the module Head
for example. Please see minimal example at the bottom of the description. But I get the following error:
ANSWER
Answered 2018-Sep-18 at 17:02from Head import HeadSchema
QUESTION
I am at the moment facing a weird behaviour when running Python doctests in Pytest (py.test
). The following snippet highlights the bevaviour.
- The doctests do pass when the script is invoked via
python2.7 ./weirdpytestbehaviour_test.py
. - The doctests do not pass when the script is invoked via
py.test ./weirdpytestbehaviour_test.py --doctest-modules --tb=short
. - If I change the statement
except CalledProcessError as e:
intoexcept Exception as e:
the doctests then also pass withpy.test
.
It seems as py.test has some special treatment for the CalledProcessError
exception type. It is very unintuitive that the code takes a different evaluation path when executed in py.test
.
How can I control or tweak that behaviour?
ANSWER
Answered 2018-Mar-20 at 19:27After some trial and error I solved this issue by uninstalling and re-installing not only pytest but also the plugins I used. After that it was working again.
Cleaning the cache (__pycache__
) did not have an effect. Apparently there was something wrong with the installation of pytest and its plugins.
QUESTION
I am a complete beginner, but I have created a small website using Python / Django with the help of django-cookiecutter, including the deploy to Heroku instructions. I am in the process of deploying it for the first time to Heroku, however, the build is failing at the point in which it is running setup.py install for django-appconf, suggesting that it is due to the fact that Heroku already has the "Six" package.
The error message I am receiving is as follows:
...ANSWER
Answered 2018-Feb-21 at 11:04When installing the requiements in Heroku, you should remove the --install-option="--without-c-extensions"
.
Note that you do require the option when installing the requirements in Windows.
QUESTION
I want to integrate my project into Travis-CI. My project involved a Flask web-server in Python with a postgresql database. All my tests use a web server running in debug mode. I'm trying to get this set up properly on Travis-CI and am having some troubles.
I'm building and testing under python 2.7 and 3.4, and the problem is my web server does not appear to start during the 3.4 build. The build for 2.7 starts first, runs fine, and all my tests pass, however the web server fails to start in the 3.4 build. When I run each build individually, both the 2.7 and 3.4 builds work fine and all tests pass. Is there a conflict between the web servers for each build? Here is my travis.yml file.
...ANSWER
Answered 2017-Mar-27 at 20:44I solved this by increasing my sleep time from 10 to 20. Apparently, 10 seconds was too short a time to allow the web server to start up.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pytest-sugar
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page