Tests get the QE key from an env variable now.

This commit is contained in:
Jesús Pérez 2017-05-10 19:27:27 +02:00
parent 691b0428ac
commit f9fe204e7b
3 changed files with 18 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
# SDK config file
Qconfig.py
# We need it in the tests.
!test/Qconfig.py
# ply outputs
qiskit/qasm/parser.out

View File

@ -114,7 +114,7 @@ make env-dev
- Please run this to be sure your code fits with the style guide and the tests keep passing:
```sh
make test
QE_KEY=putYourQExperienceKeyHere make test
```
### Commit messages rules

15
test/Qconfig.py Normal file
View File

@ -0,0 +1,15 @@
# Before you can use the jobs API, you need to set up an access token.
# Log in to the Quantum Experience. Under "Account", generate a personal
# access token. Replace "None" below with the quoted token string.
# Uncomment the APItoken variable, and you will be ready to go.
import os
APItoken = os.environ['QE_KEY']
config = {
"url": 'https://quantumexperience.ng.bluemix.net/api'
}
if 'APItoken' not in locals():
raise Exception("Please set up your access token. See Qconfig.py.")