#! /usr/bin/make -f

export PYBUILD_NAME=textual

# - tests/test_features.py - requires https://github.com/Textualize/textual-dev which we probably dont want to package anyway
# - tests/test_focus.py - incompatible with pytest-asyncio>=0.25.0, https://github.com/Textualize/textual/issues/5511
# - tests/command_palette/* - rich compatibility
# - individual skip tests - rich compatibility
# - test_textual_dev_*_preview - require https://github.com/Textualize/textual-dev, see above
# - test_richlog_*width*, test_richlog_deferred_render_expand, test_welcome - snapshots
#   recorded with rich 14.2.0, rendered differently by rich 15.0.0
# - test_register_language - requires https://pypi.org/project/tree-sitter-languages/, still to be packaged
# - syntax mark: requires tree-sitter, not in debian; https://github.com/Textualize/textual/issues/4095#issuecomment-1921468004
# - --snapshot-warn-unused: syrupy fails the run on snapshots of tests deselected by -m, i.e. the syntax ones
export PYBUILD_TEST_ARGS = -x -vvv \
	-m "not syntax" \
	--snapshot-warn-unused \
	--ignore=tests/test_features.py \
	--ignore=tests/test_focus.py \
	--ignore=tests/command_palette \
	-k "not test_softbreak_split_links_rendered_correctly \
	and not test_headings_that_look_like_they_contain_markup \
	and not test_screen_stack_preserved \
	and not test_clicking_outside_command_palette_closes_it \
	and not test_command_source_environment \
	and not test_escape_closes_when_no_list_visible \
	and not test_register_language \
	and not test_textual_dev_border_preview \
	and not test_textual_dev_colors_preview \
	and not test_textual_dev_easing_preview \
	and not test_textual_dev_keys_preview \
	and not test_richlog_width \
	and not test_richlog_min_width \
	and not test_richlog_deferred_render_expand \
	and not test_welcome"

%:
	dh $@ --buildsystem=pybuild
