Python Unit Testing, Teams for Education

Hi everyone! Is unit testing available for python? I found in the docs that it is but in my window it says unit test not available for this language. Clarifications?

Thanks!

Hello. Yes, unit testing is available for python.
However, the newer repl templates have a bug that disables them, but there are workarounds.
Replit staff are aware of the issue, in the meantime you can do a quick fix:


If you only care about unit tests and not I/O tests:
Open the .replit file and insert this anywhere

[unitTest]
language = "python3"

If the above works or you want I/O tests:
Copy in the code from (or fork) an older repl’s .replit and replit.nix files (they have more stuff in them).
If you don’t have an older python repl, the following topic has the code in post 7 or 18

Main topic for this issue:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.