Answer principles round 1: 1 🔴, 7 🟡 (0 misread); every effect is handed in as an argument, no test patches a global, and the traces principle scopes tools that run on their user's machine
CI / tests (pull_request) Successful in 3m43s
CI / tests (pull_request) Successful in 3m43s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import contextlib
|
||||
import dataclasses
|
||||
import io
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -73,14 +74,14 @@ class Notify(Project):
|
||||
self.name_notifier("slack", SLACK_KEYS)
|
||||
slack = Slack({"ok": True})
|
||||
with contextlib.chdir(self.checkout):
|
||||
self.assertIsNone(system_effects(through("slack", slack)).dm("Which one?", None))
|
||||
self.assertIsNone(system_effects(self.home, os.environ, through("slack", slack)).dm("Which one?", None))
|
||||
self.assertEqual(slack.requests, [SLACK_POST])
|
||||
|
||||
def test_a_dm_that_names_a_directory_goes_through_the_notifier_for_the_project_holding_it_from_any_current_directory(self):
|
||||
self.name_notifier("slack", SLACK_KEYS)
|
||||
slack = Slack({"ok": True})
|
||||
with contextlib.chdir(self.home):
|
||||
self.assertIsNone(system_effects(through("slack", slack)).dm("Which one?", str(self.checkout)))
|
||||
self.assertIsNone(system_effects(self.home, os.environ, through("slack", slack)).dm("Which one?", str(self.checkout)))
|
||||
self.assertEqual(slack.requests, [SLACK_POST])
|
||||
|
||||
def test_skips_the_notice_for_a_project_that_names_no_notifier_even_where_its_env_file_holds_the_keys(self):
|
||||
|
||||
Reference in New Issue
Block a user