.cicleci/config.yml 中的这段代码是什么意思?

What does this code in .cicleci/config.yml mean?

我的同事正在尝试编写单元测试代码并使用 Circleci2.0 和 Flake8 进行测试 API。但是我不明白我应该如何编写测试代码,因为下面代码中的这一行 pytest --flake8 并不意味着。

.cicleci/config.yml 中的这段代码是什么意思?

我们是否需要在另一个xx.py文件中编写测试代码并像pytest xx.py一样执行这个.py文件?

如果我们应该的话,这一行pytest --flake8是否意味着直接在另一个或同一个文件中执行xx.py文件,即使这段代码没有提到执行测试代码文件的文件路径?

  - run:
          name: Flake8 Check
          command: |
            . venv/bin/activate
            pytest --flake8

您不需要指定文件名。引用 Pytest 文档:

By default, pytest will run all files of the form test_*.py or *_test.py in the current directory and its subdirectories. More generally, it follows standard test discovery rules.