Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion in tutorial code incorrect #186

Closed
WelliSolutions opened this issue Dec 15, 2023 · 2 comments · Fixed by #187
Closed

Assertion in tutorial code incorrect #186

WelliSolutions opened this issue Dec 15, 2023 · 2 comments · Fixed by #187
Labels
bug Something isn't working

Comments

@WelliSolutions
Copy link

In Line 100 we have an assertion that doesn't look right to me:

# Let's create a list of all submodels, to which the AAS has references, by resolving each of the submodel references:
submodels = [reference.resolve(obj_store)
             for reference in aas.submodel]

# The first (and only) element of this list should be our example submodel:
assert submodel is tmp_submodel

That assertion is identical to line 87.

From the comment, the assertion should be

# The first (and only) element of this list should be our example submodel:
assert submodels[0] is tmp_submodel
jkhsjdhjs added a commit to rwth-iat/basyx-python-sdk that referenced this issue Dec 16, 2023
Previously this simply duplicated the previous assertion used
to check the result of `obj_store.get_identifiable()`.

Fix eclipse-basyx#186
jkhsjdhjs added a commit to rwth-iat/basyx-python-sdk that referenced this issue Dec 16, 2023
Previously this simply duplicated the previous assertion used
to check the result of `obj_store.get_identifiable()`.

Fix eclipse-basyx#186
@jkhsjdhjs
Copy link
Contributor

Good catch! I created #187 to fix this.

@WelliSolutions
Copy link
Author

Thank you.

@s-heppner s-heppner added the bug Something isn't working label Dec 19, 2023
s-heppner pushed a commit that referenced this issue Dec 19, 2023
Previously this simply duplicated the previous assertion used
to check the result of `obj_store.get_identifiable()`.

Fix #186
s-heppner pushed a commit that referenced this issue Jan 3, 2024
Previously this simply duplicated the previous assertion used
to check the result of `obj_store.get_identifiable()`.

Fix #186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants