Reputation: 905
I would like to know. How I can disable some tests in Travis CI. I am trying wrote something it but it didn't work
@pytest.mark.skipif("TRAVIS" in os.environ and os.environ["TRAVIS"] == "true",
reason="Skipping this test on Travis CI.")
@pytest.mark.asyncio
async def test_can_unwatch_remote_actor(remote_manager):
Upvotes: 1
Views: 236
Reputation: 751
@pytest.mark.skipif(os.getenv("TRAVIS") == "true",
reason="Skipping this test on Travis CI.")
Upvotes: 0
Reputation: 1804
In Travis configuration you can add custom environment variable.
For example you can add in your .travis.yml
file this line
env: TRAVIS=true
then use it in skipif
.
If you would like to test it locally and you work on UNIX like system (eg. Linux, MacOS) you can test it locally with
TRAVIS=true pytest ..
Upvotes: 0