Open fdsgdshn opened 7 months ago
It sounds like you are running into namespace issues. Are you using an __init__.py
file in the modules/enum_new/
and automated_tests/transcrypt/module_enum/
folders?
In module_enum/__init__.py
you should be able to import your class normally and then use it in a call to autoTester.check()
to set up the test.
You will also need to import module_enum
and add a call to autoTester.run (module_enum, 'module_enum')
in automated_tests/transcrypt/autotest.py
to have it actually run as part of the automated tests for transcrypt.
Hi,
I'm looking to create a module in Transcrypt and also write an auto-test module for it. What steps should I take to accomplish this? I've created a file named
enum_new
undertranscrypt/modules/enum_new
, and I've defined a class namedMyEnum
within it. However, when I try to test it under transcrypt/development/automated_tests/transcrypt/module_enum/ , even after importing the class, it seems to be inaccessible. Could you provide some guidance on this matter?The error message is as follows:
from enum_new import * ModuleNotFoundError: No module named 'enum_new' Aborted
But python couldn't find this new module named enum_new.
Thanks!