Charm with name beginning `test` fails unit tests
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
If I initialize a charm whose name begins with `test`, the charm's unit tests fail. For example, if the name is `test-application`.
Cause: `tests/unit/test_charm.py` imports `src/charm.py`, which has a class called `TestApplicationCharm`. pytest tries to interpret this as a test class, but fails with a warning.
Possible ways to fix:
- Use `collect_imported_tests = false` in the charm's pytest config. See [pytest discussion](https://github.com/pytest-dev/pytest/discussions/12748#discussioncomment-13780875). It's probably not a good idea to enable this by default in the templates.
- Use `__test__ = False` in the body of the charm class. Would Charmcraft only add this if the charm name begins with `test`?
- Change the format of the name of the charm class, to avoid the issue. Again, maybe only if the charm name begins with `test`?
- Have Charmcraft reject charm names that being with `test`. (Seems a bit strong)
### To Reproduce
```
mkdir test-application
cd test-application
charmcraft init --profile=machine
tox -e unit
```
### Environment
n/a
### charmcraft.yaml
```yaml
(as generated by charmcraft init --profile=machine)
```
### Relevant log output
```shell
$ tox -e unit
...
~/test-application/src/charm.py:17: PytestCollectionWarning: cannot collect test class 'TestApplicationCharm' because it has a __init__ constructor (from: tests/unit/test_charm.py)
class TestApplicationCharm(ops.CharmBase)
...
```
Evaluation history
No evaluation history available.