This assumes you have setup your environment as described in [run_tests.md] and that you are in your virtualenv.
If you get stuck, take a peek at the solution.
-
Refactor the Cattery tests in test_cattery.py to use a py.test fixture.
@pytest.fixture def cattery_client(): ... def test__add_cats__succeeds(cattery_client): ...
-
Try adding a
scope
argument topytest.fixture
. What happens when you try setting it toscope
,session
, ormodule
?@pytest.fixture(scope='session') def cattery_client(): ...
-
When you are done, run your tests:
(catpy)user@host:~/catinabox$ python setup.py test
- When the tests run successfully, push them to your pull request:
(catpy)user@host:~/catinabox$ git commit -a
(catpy)user@host:~/catinabox$ git push origin master