Skip to content

Commit 10af9aa

Browse files
authored
Merge pull request #42 from csp-community/copier-update-2026-06-14T08-39-10
Update from copier (2026-06-14T08:39:10)
2 parents 52060b2 + 2e03ba5 commit 10af9aa

5 files changed

Lines changed: 49 additions & 40 deletions

File tree

.copier-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 9b3c202
2+
_commit: 19e0124
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: false
55
add_extension: python

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
files: '**/junit.xml'
6868

6969
- name: Upload coverage
70-
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
70+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
7171
with:
7272
token: ${{ secrets.CODECOV_TOKEN }}
7373

csp_bot_commands/tests/test_fun.py

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def test_statics(self):
5757
],
5858
)
5959
def test_execute(self, args):
60+
if isinstance(args, str):
61+
args = (args,)
6062
msg = cmd.execute(
6163
BotCommand(
6264
backend="slack",
@@ -71,78 +73,79 @@ def test_execute(self, args):
7173
assert msg is not None
7274
assert msg.backend == "slack"
7375
assert msg.channel == "test_channel"
76+
msg_text = msg.msg.replace("<@", "@").replace(">", "")
7477

7578
if args[0] == "icelandic":
76-
assert msg.msg.startswith("<@123> consoles <@456> with an Icelandic folk saying:")
79+
assert msg_text.startswith("@123 consoles @456 with an Icelandic folk saying:")
7780
elif args[0] == "german":
78-
assert msg.msg.startswith("<@123> teaches <@456> some German:")
81+
assert msg_text.startswith("@123 teaches @456 some German:")
7982
elif args[0] == "cocktail":
80-
assert msg.msg.startswith("<@123> calls <@456> over to the")
83+
assert msg_text.startswith("@123 calls @456 over to the")
8184
elif args[0] == "beer":
82-
assert msg.msg.startswith("<@123> calls <@456> over to the")
85+
assert msg_text.startswith("@123 calls @456 over to the")
8386
elif args[0] == "dune":
84-
assert msg.msg.startswith("<@123> scrapes wisdom for <@456> off the sands of Arrakis:")
87+
assert msg_text.startswith("@123 scrapes wisdom for @456 off the sands of Arrakis:")
8588
elif args[0] == "bush":
86-
assert msg.msg.startswith("<@123> impresses <@456> with a quote from George W. Bush:")
89+
assert msg_text.startswith("@123 impresses @456 with a quote from George W. Bush:")
8790
elif args[0] == "shakespeare":
88-
assert msg.msg.startswith("<@123> hurls a Shakespearean insult at <@456>:")
91+
assert msg_text.startswith("@123 hurls a Shakespearean insult at @456:")
8992
elif args[0] == "yogi":
90-
assert msg.msg.startswith("<@123> shares some Yogi Berra wisdom with <@456>:")
93+
assert msg_text.startswith("@123 shares some Yogi Berra wisdom with @456:")
9194
elif args[0] == "tolkien":
92-
assert msg.msg.startswith("<@123> offers <@456> wisdom from Middle-earth:")
95+
assert msg_text.startswith("@123 offers @456 wisdom from Middle-earth:")
9396
elif args[0] == "fortune":
94-
assert msg.msg.startswith("<@123> cracks open a fortune cookie for <@456>:")
97+
assert msg_text.startswith("@123 cracks open a fortune cookie for @456:")
9598
elif args[0] == "pratchett":
96-
assert msg.msg.startswith("<@123> enlightens <@456> with Pratchett:")
99+
assert msg_text.startswith("@123 enlightens @456 with Pratchett:")
97100
elif args[0] == "wilde":
98-
assert msg.msg.startswith("<@123> graces <@456> with an Oscar Wilde quip:")
101+
assert msg_text.startswith("@123 graces @456 with an Oscar Wilde quip:")
99102
elif args[0] == "wine":
100-
assert msg.msg.startswith("<@123> calls <@456> over to the")
103+
assert msg_text.startswith("@123 calls @456 over to the")
101104
elif args[0] == "nietzsche":
102-
assert msg.msg.startswith("<@123> darkly enlightens <@456> with Nietzsche:")
105+
assert msg_text.startswith("@123 darkly enlightens @456 with Nietzsche:")
103106
elif args[0] == "twain":
104-
assert msg.msg.startswith("<@123> shares a Mark Twain quip with <@456>:")
107+
assert msg_text.startswith("@123 shares a Mark Twain quip with @456:")
105108
elif args[0] == "zen":
106-
assert msg.msg.startswith("<@123> offers <@456> a moment of zen:")
109+
assert msg_text.startswith("@123 offers @456 a moment of zen:")
107110
elif args[0] == "stoic":
108-
assert msg.msg.startswith("<@123> offers <@456> some Stoic counsel:")
111+
assert msg_text.startswith("@123 offers @456 some Stoic counsel:")
109112
elif args[0] == "churchill":
110-
assert msg.msg.startswith("<@123> channels Churchill for <@456>:")
113+
assert msg_text.startswith("@123 channels Churchill for @456:")
111114
elif args[0] == "confucius":
112-
assert msg.msg.startswith("<@123> shares ancient wisdom with <@456>:")
115+
assert msg_text.startswith("@123 shares ancient wisdom with @456:")
113116
elif args[0] == "starwars":
114-
assert msg.msg.startswith("<@123> reaches for the Force on behalf of <@456>:")
117+
assert msg_text.startswith("@123 reaches for the Force on behalf of @456:")
115118
elif args[0] == "hitch":
116-
assert msg.msg.startswith("<@123> consults the Guide for <@456>:")
119+
assert msg_text.startswith("@123 consults the Guide for @456:")
117120
elif args[0] == "hemingway":
118-
assert msg.msg.startswith("<@123> pours a drink and quotes Hemingway for <@456>:")
121+
assert msg_text.startswith("@123 pours a drink and quotes Hemingway for @456:")
119122
elif args[0] == "dad":
120-
assert msg.msg.startswith("<@123> subjects <@456> to a dad joke:")
123+
assert msg_text.startswith("@123 subjects @456 to a dad joke:")
121124
elif args[0] == "chuck":
122-
assert msg.msg.startswith("<@123> informs <@456> of a Chuck Norris fact:")
125+
assert msg_text.startswith("@123 informs @456 of a Chuck Norris fact:")
123126
elif args[0] == "soviet":
124-
assert msg.msg.startswith("<@123> reminds <@456>:")
127+
assert msg_text.startswith("@123 reminds @456:")
125128
elif args[0] == "conspiracy":
126-
assert msg.msg.startswith("<@123> whispers to <@456>:")
129+
assert msg_text.startswith("@123 whispers to @456:")
127130
elif args[0] == "magic8":
128-
assert msg.msg.startswith("<@123> shakes the Magic 8-Ball for <@456>:")
131+
assert msg_text.startswith("@123 shakes the Magic 8-Ball for @456:")
129132
elif args[0] == "compliment":
130-
assert msg.msg.startswith("<@123> lavishes praise on <@456>:")
133+
assert msg_text.startswith("@123 lavishes praise on @456:")
131134
elif args[0] == "latin":
132-
assert msg.msg.startswith("<@123> schools <@456> in Latin:")
135+
assert msg_text.startswith("@123 schools @456 in Latin:")
133136
elif args[0] == "pirate":
134-
assert msg.msg.startswith("<@123> makes <@456> walk the plank:")
137+
assert msg_text.startswith("@123 makes @456 walk the plank:")
135138
elif args[0] == "corporate":
136-
assert msg.msg.startswith("<@123> synergizes with <@456>:")
139+
assert msg_text.startswith("@123 synergizes with @456:")
137140
elif args[0] == "motivational":
138-
assert msg.msg.startswith("<@123> puts a poster on <@456>")
141+
assert msg_text.startswith("@123 puts a poster on @456")
139142
elif args[0] == "haiku":
140-
assert msg.msg.startswith("<@123> composes a haiku for <@456>:")
143+
assert msg_text.startswith("@123 composes a haiku for @456:")
141144
elif args[0] == "programming":
142-
assert msg.msg.startswith("<@123> shares a programming joke with <@456>:")
145+
assert msg_text.startswith("@123 shares a programming joke with @456:")
143146
elif args[0] == "whiskey":
144-
assert msg.msg.startswith("<@123> calls <@456> over to the")
147+
assert msg_text.startswith("@123 calls @456 over to the")
145148
elif args[0] == "highfive":
146-
assert msg.msg.startswith("<@123> gives <@456> a magnificent")
149+
assert msg_text.startswith("@123 gives @456 a magnificent")
147150
else:
148151
assert False

csp_bot_commands/tests/test_thanks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def test_statics(self):
2121
],
2222
)
2323
def test_execute(self, args):
24+
if isinstance(args, str):
25+
args = (args,)
2426
msg = cmd.execute(
2527
BotCommand(
2628
backend="slack",
@@ -35,4 +37,5 @@ def test_execute(self, args):
3537
assert msg is not None
3638
assert msg.backend == "slack"
3739
assert msg.channel == "test_channel"
38-
assert msg.msg.startswith("<@123> thanks <@456> with")
40+
msg_text = msg.msg.replace("<@", "@").replace(">", "")
41+
assert msg_text.startswith("@123 thanks @456 with")

csp_bot_commands/tests/test_trout.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def test_statics(self):
2121
],
2222
)
2323
def test_execute(self, args):
24+
if isinstance(args, str):
25+
args = (args,)
2426
msg = cmd.execute(
2527
BotCommand(
2628
backend="slack",
@@ -35,6 +37,7 @@ def test_execute(self, args):
3537
assert msg is not None
3638
assert msg.backend == "slack"
3739
assert msg.channel == "test_channel"
38-
assert msg.msg.startswith("<@123> slaps <@456> with")
40+
msg_text = msg.msg.replace("<@", "@").replace(">", "")
41+
assert msg_text.startswith("@123 slaps @456 with")
3942
if args[0] == "trout":
4043
assert "trout" in msg.msg

0 commit comments

Comments
 (0)