Skip to content

Zn draw tester - #5140

Closed
ludogibbs wants to merge 6 commits into
espressomd:pythonfrom
ludogibbs:znDraw_tester
Closed

Zn draw tester#5140
ludogibbs wants to merge 6 commits into
espressomd:pythonfrom
ludogibbs:znDraw_tester

Conversation

@ludogibbs

Copy link
Copy Markdown
Contributor
  • Switching back from ZnDrawLocal to ZnDraw as the Visualizer object to prevent occasional errors.

  • Test script designed to verify that ZnDraw is properly loaded as the Visualizer object, ensuring that all default methods are correctly initialized and accessible.

Switching back from ZnDrawLocal to ZnDraw as the Visualizer object to prevent occasional errors.
Test script designed to verify that ZnDraw is properly loaded as the Visualizer object, ensuring that all default methods are correctly initialized and accessible.
@RudolfWeeber

Copy link
Copy Markdown
Contributor

For it to execute, in CI, you need to include the test in testsuite/python/CMakeList.txt.
It will probably also be necessary to update the docker container to include the dependencies.

Comment on lines +522 to +523
self.zndraw = zndraw.zndraw.ZnDraw(
url=url, token=self.token, timeout=config)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd recommend not using internal zndraw modules and use from zndraw import ZnDraw.

Comment on lines +34 to +54
def test_register(self):
next_option_names = []
idx = 0
driver = self.driver
buttons = driver.find_elements(
By.XPATH, '//button[@class="btn btn-outline-tertiary"]')
for button in buttons:
button.click()
s(t=0.1)
elements = driver.find_elements(By.ID, "root[method]switcher")
j = len(elements) - 1
options = [x for x in elements[j].find_elements(
By.TAG_NAME, "option")]
option_names = [x.get_attribute("value") for x in options]
if option_names == next_option_names:
continue
else:
assert option_names == method_list[idx], f"Difference: {
set(option_names) ^ set(method_list[idx])}"
idx += 1
next_option_names = option_names

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a good chance this will break for future versions of ZnDraw for several reasons

Are there any ZnDraw extensions currently used by Espresso or within any tutorial?

@jngrad

jngrad commented Feb 5, 2026

Copy link
Copy Markdown
Member

Closing as we won't be able to work on this PR further due to the significant deviation from the development branch and ZnDraw 0.6.

@jngrad jngrad closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants