-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow multiple additive server connections #143
Conversation
…additive into feat/9/refactor-startup
Laser power (W). | ||
scan_speed: float | ||
Laser scan speed (m/s). | ||
characteristic_widt: float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
characteristic_widt: float | |
characteristic_width: float |
|
||
# act, assert | ||
with pytest.raises(FileNotFoundError) as excinfo: | ||
LocalServer.launch(TEST_VALID_PORT, tmp_path, "242") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once 242 exists I think you'll have to change the version. Instead, you could choose an old version of Ansys that pyadditive does not support like 212 for example, or a fake version
with pytest.raises(ValueError): | ||
check_valid_port(1023) | ||
with pytest.raises(ValueError): | ||
check_valid_port(65536) | ||
with pytest.raises(ValueError): | ||
check_valid_port("1023") | ||
with pytest.raises(ValueError): | ||
check_valid_port("0", 1, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with pytest.raises(ValueError): | |
check_valid_port(1023) | |
with pytest.raises(ValueError): | |
check_valid_port(65536) | |
with pytest.raises(ValueError): | |
check_valid_port("1023") | |
with pytest.raises(ValueError): | |
check_valid_port("0", 1, 2) | |
ports = [1024, 65535, "1024"] | |
for port in ports: | |
with pytest.raises(ValueError): | |
check_valid_port(port) | |
with pytest.raises(ValueError): | |
check_valid_port("0", 1, 2) |
check_valid_port(1024) | ||
check_valid_port(65535) | ||
check_valid_port("1024") | ||
check_valid_port("1", 0, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_valid_port(1024) | |
check_valid_port(65535) | |
check_valid_port("1024") | |
check_valid_port("1", 0, 2) | |
ports = [1024, 65535, "1024"] | |
[check_valid_port(port) for port in ports] | |
check_valid_port("1", 0, 2) |
check_valid_ip("1.2.3.4") | ||
check_valid_ip("127.0.0.1") | ||
check_valid_ip("8.8.8.8") | ||
check_valid_ip("localhost") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_valid_ip("1.2.3.4") | |
check_valid_ip("127.0.0.1") | |
check_valid_ip("8.8.8.8") | |
check_valid_ip("localhost") | |
ips = ["1.2.3.4", "127.0.0.1", "8.8.8.8", "localhost"] | |
[check_valid_ip(ip) for ip in ips] |
closes #9
closes #55