Skip to content

Commit

Permalink
Merge edcf5ca into 93689b9
Browse files Browse the repository at this point in the history
  • Loading branch information
aliabbasrizvi committed Jun 18, 2020
2 parents 93689b9 + edcf5ca commit 7b81632
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python:
- "pypy"
- "pypy3"
install: "pip install -r requirements/core.txt;pip install -r requirements/test.txt"
script: "nosetests --with-coverage --cover-package=optimizely"
script: "pytest --cov=optimizely"
after_success:
- coveralls

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,41 +163,41 @@ install command:

You can run all unit tests with:

nosetests
pytest

#### Running all tests in a file

To run all tests under a particular test file you can use the following
command:

nosetests tests.<file_name_without_extension>
pytest tests.<file_name_without_extension>

For example, to run all tests under `test_event`, the command would be:
For example, to run all tests under `test_event_builder`, the command would be:

nosetests tests.test_event
pytest tests/test_event_builder.py

#### Running all tests under a class

To run all tests under a particular class of tests you can use the
following command:

nosetests tests.<file_name_without_extension>:ClassName
pytest tests/<file_name_with_extension>::ClassName

For example, to run all tests under `test_event.EventTest`, the command
For example, to run all tests under `test_event_builder.EventTest`, the command
would be:

nosetests tests.test_event:EventTest
pytest tests/test_event_builder.py::EventTest

#### Running a single test

To run a single test you can use the following command:

nosetests tests.<file_name_without_extension>:ClassName.test_name
pytest tests/<file_name_with_extension>::ClassName::test_name

For example, to run `test_event.EventTest.test_dispatch`, the command
For example, to run `test_event_builder.EventTest.test_init`, the command
would be:

nosetests tests.test_event:EventTest.test_dispatch
pytest tests/test_event_builder.py::EventTest::test_init

### Contributing

Expand Down
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
coverage>=4.0.3
coverage
flake8==3.6.0
funcsigs==0.4
mock==1.3.0
nose==1.3.7
pytest>=4.6.0
pytest-cov
python-coveralls
pyyaml==5.2
python-coveralls==2.7.0
tabulate==0.7.5

0 comments on commit 7b81632

Please sign in to comment.