Skip to content

Commit

Permalink
test: reducing the tests to only one
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Sep 23, 2024
1 parent acc072e commit 52078dd
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions tests/test_licensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,23 +303,16 @@ def test_stop_license_checker():
license_checker.start()
time.sleep(1)

prev_stop = license_checker.stop
prev_is_connected = license_checker.is_connected

license_checker.stop = True # Overwriting the connect attribute
# so the thread is killed right after.
time.sleep(2)
assert not license_checker._lic_file_thread.is_alive()


@requires("ansys-tools-path")
def test_is_connected_license_checker():
license_checker = licensing.LicenseChecker()

license_checker.start()
time.sleep(1)

license_checker.is_connected = True # Overwriting the connect attribute
# so the thread is killed right after.
time.sleep(2)
assert not license_checker._lic_file_thread.is_alive()
assert not prev_stop
assert not prev_is_connected


@skip_no_lic_bin
Expand Down

0 comments on commit 52078dd

Please sign in to comment.