Skip to content

Commit d9be5f9

Browse files
committed
TEMPORARY FIX: disable polarity check
disable polarity check due to issue in 4.9.x+ kernels refer to issue #170: #170 and commit c35e4cb from pull request #173: "source/c_pwm.c: disable pwm_set_polarity (broken in v4.9.x/v4.14.x)" c35e4cb
1 parent 2cb8376 commit d9be5f9

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

test/test_pwm_setup.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,17 @@ def test_start_pwm_with_polarity_one(self):
9696
assert int(duty) == 0
9797
assert int(period) == 500000
9898

99-
if kernel >= '4.1.0':
100-
assert polarity == "inversed\n"
101-
else:
102-
assert int(polarity) == 1
99+
# TEMPORARY FIX: disable polarity check
100+
# due to issue in 4.9.x+ kernels
101+
# refer to issue #170:
102+
# https://github.com/adafruit/adafruit-beaglebone-io-python/issues/170
103+
# and commit c35e4cb from pull request #173:
104+
# "source/c_pwm.c: disable pwm_set_polarity (broken in v4.9.x/v4.14.x)"
105+
# https://github.com/adafruit/adafruit-beaglebone-io-python/pull/173/commits/c35e4cb98a1f14c85aca7259132bcc97e93d78f8
106+
#if kernel >= '4.1.0':
107+
# assert polarity == "inversed\n"
108+
#else:
109+
# assert int(polarity) == 1
103110
PWM.cleanup()
104111

105112
def test_start_pwm_with_polarity_default(self):
@@ -118,10 +125,17 @@ def test_start_pwm_with_polarity_default(self):
118125
assert int(duty) == 0
119126
assert int(period) == 500000
120127

121-
if kernel >= '4.1.0':
122-
assert polarity == 'normal\n'
123-
else:
124-
assert int(polarity) == 0
128+
# TEMPORARY FIX: disable polarity check
129+
# due to issue in 4.9.x+ kernels
130+
# refer to issue #170:
131+
# https://github.com/adafruit/adafruit-beaglebone-io-python/issues/170
132+
# and commit c35e4cb from pull request #173:
133+
# "source/c_pwm.c: disable pwm_set_polarity (broken in v4.9.x/v4.14.x)"
134+
# https://github.com/adafruit/adafruit-beaglebone-io-python/pull/173/commits/c35e4cb98a1f14c85aca7259132bcc97e93d78f8
135+
#if kernel >= '4.1.0':
136+
# assert polarity == 'normal\n'
137+
#else:
138+
# assert int(polarity) == 0
125139
PWM.cleanup()
126140

127141
def test_start_pwm_with_polarity_zero(self):

0 commit comments

Comments
 (0)