Commit graph

5 commits

Author SHA1 Message Date
Darren Burns
9287f64a66
Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
Dave Pearson
5a09831c5e
Run black over path tests 2023-01-09 14:00:52 +00:00
darrenburns
bbd811d671
Support multiple CSS files (#1079)
* Support multiple CSS paths

* Update a type to match docstring

* Ensure the demo app still works

* Use absolute paths in tests to (hopefully) appease Windows

* Notes about CSS changes in guide/docstrings, small grammar/typos fixes

* Move snapshot apps into snapshot_tests dir, improve messaging in snapshot output, add test for multiple css files interacting with classvar CSS

* Ensure consistent snapshot naming cross-platform

* Use rpartition instead of partition in import_app

* Fix handling of import_app when colon in arg

* Support paths containing Windows drive names in import_app

* Add note on new relative paths in snap_compare

* Update docs/guide/CSS.md

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Fix formatting

* Update CHANGELOG to mention CSS_PATH supporting a list

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2022-11-01 17:13:25 +00:00
Dave Pearson
d7da8c6851
Absolute the intended result path
Because testing on Windows is going to add a drive to any absolute path, and
in the tests we don't want to make it specific to something like that, take
the absolute path to test against and then absolute it again which is pretty
much a NOP on a Unix-a-like, but will add the drive on Windows.
2022-10-24 11:26:43 +01:00
Dave Pearson
6c9a1a6e5d
Add tests for the initialisation of CSS_PATH
This improves coverage of _make_path_object_relative in _path.py, and
generally provides some simple tests of how CSS_PATH gets turned into a
css_path property of an App.

Note that if an actual CSS path gets added (something that has been mooted)
this will need updating.
2022-10-24 09:39:17 +01:00