Skip to content

Commit eae7176

Browse files
committed
Fixed test and added test for -a.
1 parent 36a782c commit eae7176

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

tests.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,35 @@ def test_simple(self):
99
env = {k: v for k, v in os.environ.items() if not k.endswith("_COLORS")}
1010
env["PYTHONUTF8"] = "1"
1111
process = subprocess.run(
12-
os.path.abspath("3"),
13-
shell=True,
12+
[os.path.abspath("3")],
13+
env=env,
14+
stdout=subprocess.PIPE,
15+
)
16+
self.assertEqual(process.returncode, 0)
17+
self.assertEqual(
18+
process.stdout,
19+
"""
20+
.
21+
├── 3
22+
├── 3.cmd
23+
├── examples
24+
│ └── 3.png
25+
├── LICENSE.md
26+
├── pyproject.toml
27+
├── README.md
28+
├── requirements.txt
29+
├── setup.py
30+
└── tests.py
31+
32+
1 directories, 9 files
33+
""".lstrip().encode(),
34+
)
35+
36+
def test_all(self):
37+
env = {k: v for k, v in os.environ.items() if not k.endswith("_COLORS")}
38+
env["PYTHONUTF8"] = "1"
39+
process = subprocess.run(
40+
[os.path.abspath("3"), "-a"],
1441
env=env,
1542
stdout=subprocess.PIPE,
1643
)

0 commit comments

Comments
 (0)