https://pantsbuild.org/ logo
#plugins
Title
# plugins
p

polite-angle-82480

04/09/2023, 3:48 AM
Question about writing unit tests for a async methods of a plugin. I’m getting this
TypeError: argument of type 'type' is not iterable
and I’m not sure why. I believe the test needs to be async as well? Full error is below and my plugin function snippet and unit test in the thread/
1
plugin function under test.py
unit test.py
c

curved-television-6568

04/10/2023, 12:52 PM
Python trips you up.. as these `
Copy code
(EnvironmentVarsRequest),
are just parenthesis around a single value, and is not a tuple unless you add a trailing comma (or more elements)
Copy code
(EnvironmentVarsRequest,),
same for
Copy code
(Process),
p

polite-angle-82480

04/13/2023, 8:30 PM
Thanks Andreas. I’m silent because I’m OOO. I’ll get back to you soon.
👍 1
That was it. Tests are working as expected now 👍
I feel like a noob but at least I’m unblocked
c

curved-television-6568

04/17/2023, 1:19 PM
Great. Thanks for the feedback.