Skip to content

feat: Add properties to Device and Emulator#1320

Merged
speller26 merged 1 commit into
mainfrom
properties
Jul 10, 2026
Merged

feat: Add properties to Device and Emulator#1320
speller26 merged 1 commit into
mainfrom
properties

Conversation

@speller26

Copy link
Copy Markdown
Member

Both of the main implementations of Device, namely AwsDevice and LocalSimulator, have a properties property that doesn't, but should exist in the parent class. This change codifies this property, and gives emulators the capabilities of the emulated device.

Issue #, if available:

Description of changes:

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Both of the main implementations of `Device`, namely `AwsDevice` and `LocalSimulator`, have a `properties` property that doesn't, but should exist in the parent class. This change codifies this property, and gives emulators the capabilities of the emulated device.
@speller26 speller26 requested a review from a team as a code owner July 10, 2026 19:22
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fe0aee7) to head (af455fd).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1320   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          171       171           
  Lines        11489     11497    +8     
  Branches      1499      1499           
=========================================
+ Hits         11489     11497    +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sesmart

sesmart commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🙌 @speller26 this fixes some other random issues I've had T.T. Can properly direct emulator properties in the QBP as well.

Comment on lines 72 to 73
if isinstance(device_properties, DeviceEmulatorProperties):
device_em_properties = device_properties

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to double-check - it's intentional that you don't (can't) set device_capabilities in this branch, correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because DeviceEmulatorProperties does not subclass DeviceCapabilities, and setting it in this branch would produce unexpected results when interacting with .properties.

@speller26 speller26 merged commit 50262bc into main Jul 10, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants