Giter VIP home page Giter VIP logo

Comments (2)

DavidVujic avatar DavidVujic commented on August 22, 2024 1

Good ideas @BeRT2me!

I have thought about this, and ways of implementing a poly test command that should be able to run tests for the changed bricks only. Inspired by the Clojure tooling: https://polylith.gitbook.io/poly/commands#test

This will probably be doable when using the Polylith structure also for the tests,
such as test/<component-or-base>/<top-namespace>/<brick-name>.

If not disabled in the workspace.toml, a unit test template file is created when running poetry poly create for a component or base. Another idea I have is to add Pytest markers to the template (but then the tool will assume that the test tool is actually pytest). Alternatively, write about this as suggestions in the docs on how to run tests in an efficient way, by using markers.

The markers could be the corresponding brick name, and with some help from the diff command we have a list of changed bricks matching the markers when running pytest.

from python-polylith.

DavidVujic avatar DavidVujic commented on August 22, 2024

Hello again @BeRT2me!

I have added a new option to the poly diff command, to make it easier running tests for changed code only. I hope this will be useful for you. It is available in v1.11.0 of the tool.

Here's updated docs about the option and how it can be used for testing with pytest:
https://davidvujic.github.io/python-polylith-docs/commands/#testing

from python-polylith.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.