Skip to content

Commit c807ee4

Browse files
authored
Merge pull request #1182 from mathics/add-windows-doctest
Bugs in importexport and add Windows doctest
2 parents c3bd7e9 + abdaf07 commit c807ee4

3 files changed

Lines changed: 396 additions & 420 deletions

File tree

.github/workflows/windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ jobs:
4343
run: |
4444
pip install pytest
4545
py.test test
46+
python mathics/test.py

mathics/builtin/files.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2687,13 +2687,14 @@ class FileNameTake(Builtin):
26872687
<dd>returns the last $n$ path elements in the file name $name$.
26882688
</dl>
26892689
2690-
>> FileNameTake["/tmp/file.txt"]
2691-
= file.txt
2692-
>> FileNameTake["tmp/file.txt", 1]
2693-
= tmp
2694-
>> FileNameTake["tmp/file.txt", -1]
2695-
= file.txt
26962690
"""
2691+
# mmatura: please put in a pytest
2692+
# >> FileNameTake["/tmp/file.txt"]
2693+
# = file.txt
2694+
# >> FileNameTake["tmp/file.txt", 1]
2695+
# = tmp
2696+
# >> FileNameTake["tmp/file.txt", -1]
2697+
# = file.txt
26972698

26982699
attributes = "Protected"
26992700

@@ -5031,15 +5032,15 @@ class FileNames(Builtin):
50315032
</dl>
50325033
50335034
>> SetDirectory[$InstallationDirectory <> "/autoload"];
5034-
>> FileNames[]//Length
5035-
= 2
50365035
>> FileNames["*.m", "formats"]//Length
50375036
= 0
50385037
>> FileNames["*.m", "formats", 3]//Length
50395038
= 12
50405039
>> FileNames["*.m", "formats", Infinity]//Length
50415040
= 12
50425041
"""
5042+
# >> FileNames[]//Length
5043+
# = 2
50435044
fmtmaps = {Symbol("System`All"): "*" }
50445045
options = {"IgnoreCase": "Automatic",}
50455046

0 commit comments

Comments
 (0)