Questions on educational version - creating content

Hello,

Using the Educational Version of PyCharm, I'm writing some lessons using the Minecraft PI forge plugin (https://github.com/kbsriram/mcpiapi)

I'd like to write a test to see if a variable was assigned a value. Simple example:

a = 10

in tests.py, I can see that they created a variable called "a", but I'd like to test that it was assigned the value of 10. I'm really looking to see if something like this: mc = minecraft.Minecraft.create() was successful (i.e. the student connected successfully to the instance of minecraft that's running). So I'd like to know if mc doesn't equal nil.

Also, I'd like to included additional directories in the lessons (the mcpi directory that has all the pre-written minecraft python code). I need this directory to be exported with the courses zip file and brought in as part of the course when the student opens the lesson. Is it possible to do this?
1 comment
Comment actions Permalink
Duplicates the support request to pycharm-support@jetbrains.com:

but I'd like to test that it was assigned the value of 10.


Let's say you have task.answer.py where t = 10. Then you write:

```
import task

if (task.t == 10):
    passed()
else:
    failed(your message)
```

But also you can check the example in our python introduction course: https://github.com/JetBrains/pycharm-courses/blob/master/introduction_course/lesson2/task1/tests.py

Also, I'd like to included additional directories in the lessons (the mcpi directory that has all the pre-written minecraft python code). I need this directory to be exported with the courses zip file and brought in as part of the course when the student opens the lesson. Is it possible to do this?


Unfortunately with current EDU version you can do it only manually, but with the next version you will have this option from GUI.
0

Please sign in to leave a comment.