Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d30ba9ff
Commit
d30ba9ff
authored
Oct 02, 2017
by
Tyler Hallada
Committed by
Tyler Hallada
Oct 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document how to run @ddt.data methods with pytest
parent
28575fb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
docs/testing.rst
+16
-0
No files found.
docs/testing.rst
View file @
d30ba9ff
...
@@ -263,6 +263,22 @@ This command runs a single python unit test within a specified file.
...
@@ -263,6 +263,22 @@ This command runs a single python unit test within a specified file.
pytest common/lib/xmodule/xmodule/tests/test_stringify.py::test_stringify
pytest common/lib/xmodule/xmodule/tests/test_stringify.py::test_stringify
This command runs a single python unit test method within a specified TestCase
class within a specified file.
::
pytest common/lib/xmodule/xmodule/tests/test_stringify.py::TestCase::test_stringify
Note: if the method has an `@ddt.data` decorator, ddt will create multiple
methods with the same prefix name and each individual data input as the suffix
(e.g. `test_stringify_1_foo`). To test all of the ddt.data variations of the
same test method, use the pytest `-k` option.
::
pytest common/lib/xmodule/xmodule/tests/test_stringify.py::TestCase -k test_stringify
This is an example of how to run a single test and get stdout shown immediately, with proper env config.
This is an example of how to run a single test and get stdout shown immediately, with proper env config.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment