mirror of
https://github.com/micropython/micropython.git
synced 2025-09-06 18:00:48 +02:00
The original logic of reducing a full path to a relative one assumes "tests/misc" is in the filename which is limited in usage: it never works for CPython on Windows since that will use a backslash as path separator, and also won't work when the filename is a path not relative to the tests directory which happens for example in the common case of running "./run-tests -d misc". Fix all cases by printing only the bare filename, which requires them all to start with sys_settrace_ hence the renaming.
29 lines
361 B
Python
29 lines
361 B
Python
print("Yep, I got imported.")
|
|
|
|
try:
|
|
x = const(1)
|
|
except NameError:
|
|
print("const not defined")
|
|
|
|
const = lambda x: x
|
|
|
|
_CNT01 = "CONST01"
|
|
_CNT02 = const(123)
|
|
A123 = const(123)
|
|
a123 = const(123)
|
|
|
|
|
|
def dummy():
|
|
return False
|
|
|
|
|
|
def saysomething():
|
|
print("There, I said it.")
|
|
|
|
|
|
def neverexecuted():
|
|
print("Never got here!")
|
|
|
|
|
|
print("Yep, got here")
|