Skip to content

Commit

Permalink
Test fix 5
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion committed Jul 27, 2024
1 parent cc8b3ae commit c7a6a32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/merge-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ jobs:
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
- name: Send coverage results
if: ${{ success() }}
if: success()
uses: codecov/codecov-action@v4
env:
codecov_token: ${{ secrets.codecov_token }}

pydicom-dev:
# Matrix builds with development pydicom
Expand Down Expand Up @@ -117,8 +119,10 @@ jobs:
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
- name: Send coverage results
if: ${{ success() }}
if: success()
uses: codecov/codecov-action@v4
env:
codecov_token: ${{ secrets.codecov_token }}

pydicom-release:
# Matrix builds with released pydicom
Expand Down Expand Up @@ -161,5 +165,7 @@ jobs:
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
- name: Send coverage results
if: ${{ success() }}
if: success()
uses: codecov/codecov-action@v4
env:
codecov_token: ${{ secrets.codecov_token }}
9 changes: 8 additions & 1 deletion pynetdicom/tests/test_assoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7573,7 +7573,10 @@ def test_set_timer_resolution(self):
"""Test setting the windows timer resolution works."""
min_val, max_val, pre_timer = self.get_timer_info()
# Ensure we always start with the worst resolution
with set_timer_resolution(max_val):
print("Initial", min_val, max_val, pre_timer)
with set_timer_resolution(max_val / 10000):
min_val, max_val, now = self.get_timer_info()
print("Setup", min_val, max_val, now)
# Set the timer resolution to the minimum plus 10%
pynetdicom._config.WINDOWS_TIMER_RESOLUTION = min_val * 1.10 / 10000

Expand All @@ -7589,6 +7592,7 @@ def test_set_timer_resolution(self):
assoc = ae.associate("localhost", 11112)

min_val, max_val, during_timer = self.get_timer_info()
print("During", min_val, max_val, during)
assert during_timer < pre_timer
assoc.release()
assert assoc.is_released
Expand All @@ -7599,3 +7603,6 @@ def test_set_timer_resolution(self):

min_val, max_val, post_timer = self.get_timer_info()
assert post_timer > during_timer

min_val, max_val, now = self.get_timer_info()
print("After", min_val, max_val, now)

0 comments on commit c7a6a32

Please sign in to comment.