Skip to content

Commit

Permalink
fix: path issue for integ-tests (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
virajvchaudhari authored Nov 4, 2021
1 parent 6f86841 commit 4dd1b8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integ_tests/test_create_quantum_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

import json
import os.path
import re
Expand Down Expand Up @@ -155,6 +156,7 @@ def test_completed_quantum_job(aws_session, capsys):

# Check downloaded results exists in the file system after the call.
downloaded_result = f"{job_name}/{AwsQuantumJob.RESULTS_FILENAME}"
current_dir = Path.cwd()

with tempfile.TemporaryDirectory() as temp_dir:
os.chdir(temp_dir)
Expand All @@ -165,7 +167,7 @@ def test_completed_quantum_job(aws_session, capsys):

# Check results match the expectations.
assert job.result() == {"converged": True, "energy": -0.2}
os.chdir("..")
os.chdir(current_dir)

# Check the logs and validate it contains required output.
job.logs(wait=True)
Expand Down

0 comments on commit 4dd1b8a

Please sign in to comment.