Mimesis: Add pytest-randomly

Created on 16 Jun 2018  路  11Comments  路  Source: lk-geimfari/mimesis

We need to run tests in random order to be sure, that they do not depend on each other.

https://github.com/pytest-dev/pytest-randomly

help wanted

All 11 comments

@sobolevn Seems like this already fixed.

@sobolevn Do you know how to add entry point to mimesis? I'm not sure that I completely understand the idea of how pytest-randomly works with entry points.

Nope, sorry, I haven't seen it yet.

This issue has been automatically marked as stale because it has not had activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

This issue has been automatically marked as stale because it has not had activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

If no one is working on this at the moment, I'd like to give it a shot.

Checking this issue vs #469 I see it that this issue is already fulfilled. As described in the opening post, the intent was to run pytest in random order to check for possible dependencies of the tests.

To make use of the seed functionality in pytest-randomly I modified the makefile so that it now takes an optional parameter SEED.

SEED = unspecified

ifeq ("$(SEED)", "unspecified")
RANDOM_SEED =
else
RANDOM_SEED = --randomly-seed=$(SEED)
endif
.PHONY: test
test:
    pytest --color=yes $(RANDOM_SEED) ./
    mypy mimesis/ tests/
    make clean

SEED can be:
"last" -> rerunning the tests with the seed from the previous run
int -> giving specific seed

As I'm mainly a Python developer I'm not that well versed in makefiles and would appreciate your modifications in making it prettier.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lk-geimfari picture lk-geimfari  路  5Comments

lk-geimfari picture lk-geimfari  路  6Comments

lk-geimfari picture lk-geimfari  路  7Comments

dumprop picture dumprop  路  6Comments

lk-geimfari picture lk-geimfari  路  3Comments