()
| 1815 | |
| 1816 | |
| 1817 | def test_every_self_pyfunction(): |
| 1818 | items = ['Four', 'Three', 'One'] |
| 1819 | |
| 1820 | def increment(self, element, index, array): |
| 1821 | self.count += 1 |
| 1822 | |
| 1823 | try: |
| 1824 | pm.eval(""" |
| 1825 | (arr, increment, result) => { |
| 1826 | let jsObj = {count: 0} |
| 1827 | arr.every(increment, jsObj); |
| 1828 | return jsObj.count; |
| 1829 | } |
| 1830 | """)(items, increment) |
| 1831 | assert False |
| 1832 | except Exception as e: |
| 1833 | assert type(e) is TypeError |
| 1834 | assert str(e).__contains__("unbound python functions do not have a 'self' to bind") |
| 1835 | |
| 1836 | |
| 1837 | def test_every_self_jsfunction(): |
nothing calls this directly
no outgoing calls
no test coverage detected