myshell-py 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {myshell_py-0.4.0 → myshell_py-0.4.1}/PKG-INFO +1 -1
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/sched.py +7 -1
- {myshell_py-0.4.0 → myshell_py-0.4.1}/pyproject.toml +1 -1
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_coreutils.py +2 -1
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_sched.py +1 -1
- {myshell_py-0.4.0 → myshell_py-0.4.1}/.gitignore +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/README.md +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/__init__.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/__main__.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/aliases.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/arith.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/builtins.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/cli.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/compat.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/completion.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/coreutils.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/editor.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/errors.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/executor.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/expand.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/guide.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/heredoc.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/highlight.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/history.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/jobs.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/lexer.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/more_builtins.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/parser.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/paths.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/procs.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/progress.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/prompt.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/quiz.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/state.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/textedit.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/myshell/theme.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/pytest.ini +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/requirements.txt +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/shell.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/src/myshell/__init__.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/conftest.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_aliases.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_arith.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_builtins.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_cli.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_completion.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_editor.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_expand.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_expansion_e2e.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_guide.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_heredoc.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_highlight.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_history.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_history_fallback.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_if.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_interactive.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_jobs.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_language.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_lexer.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_loops.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_more_builtins.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_parser.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_pipelines.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_procs.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_prompt.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_quiz_progress.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_redirects.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_startup.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_textedit.py +0 -0
- {myshell_py-0.4.0 → myshell_py-0.4.1}/tests/test_theme.py +0 -0
|
@@ -531,8 +531,14 @@ def _cron_log(args: List[str], stdout: TextIO, stderr: TextIO) -> int:
|
|
|
531
531
|
if args and args[0] == "--clear":
|
|
532
532
|
try:
|
|
533
533
|
os.remove(log_file())
|
|
534
|
-
except
|
|
534
|
+
except FileNotFoundError:
|
|
535
535
|
pass
|
|
536
|
+
except OSError:
|
|
537
|
+
try:
|
|
538
|
+
open(log_file(), "w").close() # Windows: a running task still holds the file
|
|
539
|
+
except OSError:
|
|
540
|
+
print("cron log: could not clear the log", file=stderr)
|
|
541
|
+
return 1
|
|
536
542
|
print("cron log cleared", file=stdout)
|
|
537
543
|
return 0
|
|
538
544
|
count = 20
|
|
@@ -23,7 +23,8 @@ def write(path, text):
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def test_the_table_has_every_command():
|
|
26
|
-
|
|
26
|
+
core = set("ls cat head tr sleep mkdir rm cp mv touch wc grep".split())
|
|
27
|
+
assert core <= set(PORTABLE) # ps, top and nano join the table when builtins loads
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class TestLs:
|
|
@@ -166,7 +166,7 @@ def test_real_task_writes_the_log(state, dirs, monkeypatch):
|
|
|
166
166
|
code, out, _ = run(sched.builtin_cron, state, ["log"])
|
|
167
167
|
assert "from-cron-task" in out
|
|
168
168
|
assert run(sched.builtin_cron, state, ["log", "--clear"])[0] == 0
|
|
169
|
-
assert not log.exists()
|
|
169
|
+
assert not log.exists() or log.read_text() == ""
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
def test_shell_commands(sh):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|