0

My pytest installation with ubuntu is not running with python3 instead it uses python 2.7

How am able to switch to python3 when running pytest?

python3 -m pytest . is working, but it is not an option, because the program, that runs my tests uses pytest ...

5
  • In this case you have to make sure that your program has the correct PATH set, so that it finds the correct pytest or Python version. Commented Oct 8, 2020 at 12:26
  • should not pytest have the right python? Commented Oct 8, 2020 at 13:17
  • pytest does not have Python, it uses the Python it finds in the path. Commented Oct 8, 2020 at 15:05
  • i set an alias python=python, but it did not help Commented Oct 8, 2020 at 15:46
  • You could call python3-pytest with pytest-3. Commented Jun 11, 2021 at 14:03

1 Answer 1

1

I used pytest-3 to solve this problem.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.