thenewboston-blockchain / Bank

Bank for thenewboston digital currency.
https://thenewboston.com
MIT License
87 stars 42 forks source link

Exec. tests in parallel (test exec. speed) #67

Closed buckyroberts closed 4 years ago

fonar commented 4 years ago

--- cut --- Mikhail: agree, one of the options is simply adding pytext-xdist package Volodymyr: Well, it’s not THAT simple, one should also take care of databases, since tests are running in parallel, one test can interfere to another, so, there should be a separate database per test thread, not a rocket science, but should be considered --- cut ---

@buckyroberts @vosi Actually, it's that simple, as it's already done by pytest-django, and pytest-xdist required as requirement for pytest-django in case we running it in parallel.

All we need is: (1) add pytest-xdist as requirement (2) run pytest -n NUMBER_OF_PROCESSES

vosi commented 4 years ago

@fonar Great, what about redis?

fonar commented 4 years ago

@vosi frankly, not did it before, not even thinked of it, first that comes in mind, just creating auto fixture that patch settings to use 'fakeredis' insted of real. That's quick solution, and should work. But maybe there some alternative solutions.