Comments (2)
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.
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)
- poly delete HOT 1
- `tdd` theme doesn't work with `pdm` HOT 5
- adding a poly deps command
- poetry scripts break when building with --with-top-namespace HOT 8
- poetry poly create base will allow names with dashes HOT 4
- Poly sync not working properly for projects in sub-directories HOT 1
- there are some errors using rye HOT 10
- v1.5.0 release is broken for Python < 3.12 HOT 6
- can't develop under editable mode in rye HOT 23
- error in rye build --whell HOT 1
- Improve functionality of "components" (specification of external dependencies & wheel builds)
- Aliases configuration file HOT 12
- [Guidance] A way to specify SAAS provided dependencies HOT 10
- "poetry poly sync" returns "'Key "tool" does not exist.| HOT 13
- Add a namespace for the bases and component HOT 1
- Issue with autogenerated tests and implicit namespace folders for `tdd` theme HOT 4
- Discrepency between `poly diff` and `poly create` for `tdd` theme HOT 3
- Getting in touch! HOT 2
- (poetry plugin) Third-party import lookup fails for some libraries (example: python-jose).
- poly libs and poly check: optionally return error for library version mismatch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-polylith.