Please don't report bugs here but to the ticket tracker. If you're not sure there's a bug, django-users, the forum, or IRC are the recommended venues.
That said, I cannot reproduce your problem. Using django's main branch, I started a new project with a tests.py file using your exact content and it errors on import as expected:
$ ./manage.py test --tag abc
System check identified no issues (0 silenced).
E
======================================================================
ERROR: example.core.tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: example.core.tests
Traceback (most recent call last):
File "/.../python3.9/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/.../python3.9/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/.../example/core/tests.py", line 4, in <module>
assert 0
AssertionError
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)