Skip to content

Commit 668b921

Browse files
committed
update tests to accept color
1 parent 81bbcdd commit 668b921

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

tests/test_packsmanager.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
from diffpy.cmi import installer
8-
from diffpy.cmi.packsmanager import PacksManager
8+
from diffpy.cmi.packsmanager import PacksManager, Styles
99

1010

1111
def paths_and_names_match(expected, actual, root):
@@ -345,24 +345,22 @@ def test_copy_examples_force(example_cases, expected_paths, force):
345345
assert copied_path.read_text() == original_path.read_text()
346346

347347

348+
s = Styles()
348349
install_params = [
349350
( # input: packs to install
350351
# expected: output showing packA installed but not packB
351352
("packA",),
352-
"""Installed Packs:
353-
----------------
353+
f"""{s.BOLD}{s.UNDER}{s.BLUE}Installed Packs:{s.RESET}
354354
packA
355355
356-
Available Packs:
357-
----------------
356+
{s.BOLD}{s.UNDER}{s.BLUE}Available Packs:{s.RESET}
358357
packB
359358
360-
Examples:
361-
---------
362-
packA:
359+
{s.BOLD}{s.UNDER}{s.CYAN}Examples:{s.RESET}
360+
{s.BOLD}packA:{s.RESET}
363361
- ex1
364362
- ex2
365-
packB:
363+
{s.BOLD}packB:{s.RESET}
366364
- ex1
367365
- ex3
368366
- ex4""",

tests/test_profilesmanager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import pytest
22
import yaml
33

4+
from diffpy.cmi.packsmanager import Styles
45
from diffpy.cmi.profilesmanager import ProfilesManager
56

7+
s = Styles()
68
install_params = [
79
( # input: profiles to install
810
# expected: print_profile output showing profileA
911
# installed but not profileB
1012
("profileA",),
11-
"""Installed Profiles:
12-
-------------------
13+
f"""{s.BOLD}{s.UNDER}{s.MAGENTA}Installed Profiles:{s.RESET}
1314
profileA
1415
15-
Available Profiles:
16-
-------------------
16+
{s.BOLD}{s.UNDER}{s.MAGENTA}Available Profiles:{s.RESET}
1717
profileB
1818
""",
1919
),

0 commit comments

Comments
 (0)