Skip to content

Pacman build #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ build: $(HTML_PAGES) $(TMPDIR)

.PHONY: install
install: .venv/bin
which brew && brew install asciidoctor || apt install -y asciidoctor
which asciidoctor || (which brew && brew install asciidoctor || apt install -y asciidoctor || sudo pacman -S --needed asciidoctor)

.PHONY: update-submodules
update-submodules:
Expand Down
36 changes: 36 additions & 0 deletions tests/test_system_requirements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import unittest
from sourcetree import (
SourceTree,
)


class RequirementTestCase(unittest.TestCase):
def test_en_GB_locale_is_installed(self):
sourcetree = SourceTree()
Comment on lines +1 to +9
Copy link
Owner

@hjwp hjwp May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use pytest for tests:

Suggested change
import unittest
from sourcetree import (
SourceTree,
)
class RequirementTestCase(unittest.TestCase):
def test_en_GB_locale_is_installed(self):
sourcetree = SourceTree()
from sourcetree import SourceTree
def test_en_GB_locale_is_installed(self):
sourcetree = SourceTree()


locales = sourcetree.run_command("locale -a").split("\n")
# debian sudo locale-gen en_GB.UTF-8 && sudo update-locale
# arch : https://wiki.archlinux.org/title/locale
# uncomment en_GB.UTF-8

# cd /etc && sudo git diff 3 i have etckeeper installed
"""
diff --git a/locale.gen b/locale.gen
index 2f21f03..210ee98 100644
--- a/locale.gen
+++ b/locale.gen
@@ -157,7 +157,7 @@
#en_CA ISO-8859-1
#en_DK.UTF-8 UTF-8
#en_DK ISO-8859-1
-#en_GB.UTF-8 UTF-8
+en_GB.UTF-8 UTF-8
#en_GB ISO-8859-1
#en_HK.UTF-8 UTF-8
#en_HK ISO-8859-1
"""

assert (
"en_GB.utf8" in locales,
"Lacking en_GB locale. " "This interferes with checks for output.",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh even if you do have utf8 locale installed, the chapter 1 tests fail sometimes (eg on a mac). i think i added a workaround/hack for this somewhere...

)
Loading