You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -97,9 +97,16 @@ Running tests
97
97
98
98
SageMaker Python SDK has unit tests and integration tests.
99
99
100
+
You can install the libraries needed to run the tests by running :code:`pip install --upgrade .[test]` or, for Zsh users: :code:`pip install --upgrade .\[test\]`
101
+
100
102
**Unit tests**
101
103
102
-
tox is a prerequisite for running unit tests so you need to make sure you have it installed. To run the unit tests:
104
+
105
+
We run unit tests with tox, which is a program that lets you run unit tests for multiple Python versions, and also make sure the
106
+
code fits our style guidelines. We run tox with Python 2.7 and 3.6, so to run unit tests
107
+
with the same configuration we do, you'll need to have interpreters for Python 2.7 and Python 3.6 installed.
108
+
109
+
To run the unit tests with tox, run:
103
110
104
111
::
105
112
@@ -109,23 +116,29 @@ tox is a prerequisite for running unit tests so you need to make sure you have i
109
116
110
117
To run the integration tests, the following prerequisites must be met
111
118
112
-
1. Access to an AWS account to run the tests on
113
-
2. AWS account credentials available to boto3 clients used in the tests
114
-
3. The AWS account has an IAM role named :code:`SageMakerRole`
115
-
4. The libraries listed in the ``extras_require`` object in ``setup.py`` for ``test`` are installed.
116
-
You can do this by running the following command: :code:`pip install --upgrade .[test]`
119
+
1. AWS account credentials are available in the environment for the boto3 client to use.
120
+
2. The AWS account has an IAM role named :code:`SageMakerRole` with the AmazonSageMakerFullAccess policy attached.
121
+
122
+
We recommend selectively running just those integration tests you'd like to run. You can filter by individual test function names with:
123
+
124
+
::
125
+
126
+
pytest -k 'test_i_care_about'
127
+
117
128
118
-
You can run integ tests by issuing the following command:
129
+
You can also run all of the integration tests by running the following command, which runs them in sequence, which may take a while:
119
130
120
131
::
121
132
122
133
pytest tests/integ
123
134
124
-
You can also filter by individual test function names (usable with any of the previous commands):
0 commit comments