Skip to content

Resolve issue 103 - failing test due to new micropython release #105

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

Merged
merged 2 commits into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_picozero.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ def test_pwm_output_device_alt_values(self):
self.assertEqual(d.freq, 200)

d.off()
# pwm returns 1 less than the duty_factor unless the duty is set to the maximum 65535
self.assertEqual(d._pwm.duty_u16(), 9999)
# prior to micropython v1.20 PWM returned 1 less than the duty_factor
# unless the duty was set to the maximum 65535
# self.assertEqual(d._pwm.duty_u16(), 9999)
self.assertEqual(d._pwm.duty_u16(), 10000)
self.assertAlmostEqual(d.value, 0, places=2)

d.on()
Expand Down