Skip to content

Commit

Permalink
fix tests to support case insensitive file systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Mar 20, 2023
1 parent ae8264a commit 2f8c0ad
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 24 deletions.
7 changes: 7 additions & 0 deletions doc/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Latest development release
| Released: 2023-03-08

1.35 (2023-03-20)
-----------------
- Improved the time resolution in :ref:`due <due>` command.
- Added *si* format to :ref:`manifest <manifest>` command.
- Allow *config_dir* to be specified through API.


1.34 (2022-11-03)
-----------------
- Added ability to apply the :ref:`info <info>` command to a particular archive.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"appdirs",
"arrow>=0.15",
"docopt",
"inform>=1.26",
"inform>=1.28",
"quantiphy",
"requests",
]
Expand Down
2 changes: 1 addition & 1 deletion tests/CONFIGS/README → tests/STARTING_CONFIGS/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
There are 9 base configurations and one composite configurations.
Before the start of testing, 'CONFIGS' is copied to 'configs'
Before the start of testing, 'STARTING_CONFIGS' is copied to 'configs'

The tests back up only this directory or the 'configs' subdirectory
- need a controlled set of files to test manifest
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 20 additions & 20 deletions tests/test-cases.nt
Original file line number Diff line number Diff line change
Expand Up @@ -628,15 +628,15 @@ emborg with configs:
expected:
> run_before_borg on test0
> run_after_borg on test0
cmp_dirs: /⟪EMBORG⟫/tests/CONFIGS configs
cmp_dirs: /⟪EMBORG⟫/tests/STARTING_CONFIGS configs

oddment:
remove: configs
args: --quiet --config test0 restore configs
expected:
> run_before_borg on test0
> run_after_borg on test0
cmp_dirs: CONFIGS configs
cmp_dirs: STARTING_CONFIGS configs

freelance:
args: --quiet --config test0 mount EMBORG
Expand Down Expand Up @@ -728,8 +728,8 @@ emborg with configs:
> 614B tests/configs/settings
> 671B tests/configs/test3
> 965B tests/configs/test4
> 1.84kB tests/configs/README
> Total size = 7.34kB.
> 1.85kB tests/configs/README
> Total size = 7.35kB.
expected_type: regex

sparkler:
Expand Down Expand Up @@ -764,7 +764,7 @@ emborg with configs:
> run_before_borg 1
> run_after_borg 0
> run_after_borg 1
cmp_dirs: CONFIGS tests/configs
cmp_dirs: STARTING_CONFIGS tests/configs

rewrite:
remove: configs tests
Expand All @@ -774,7 +774,7 @@ emborg with configs:
> run_before_borg 1
> run_after_borg 0
> run_after_borg 1
cmp_dirs: CONFIGS tests/configs
cmp_dirs: STARTING_CONFIGS tests/configs

abuse:
remove: configs tests
Expand All @@ -784,7 +784,7 @@ emborg with configs:
> run_before_borg 1
> run_after_borg 0
> run_after_borg 1
cmp_dirs: CONFIGS configs
cmp_dirs: STARTING_CONFIGS configs

dozen:
args: --quiet --config test4 mount
Expand Down Expand Up @@ -940,12 +940,12 @@ emborg with configs:
> ⟪EMBORG⟫/tests/configs/test8
> ⟪EMBORG⟫/tests/configs/test9
expected_type: sort-lines
cmp_dirs: CONFIGS configs
cmp_dirs: STARTING_CONFIGS configs

execute:
args: --quiet --config test5 mount
expected: Mounting filesystem
cmp_dirs: EMBORG/⟪EMBORG⟫/tests/configs CONFIGS
cmp_dirs: EMBORG/⟪EMBORG⟫/tests/configs STARTING_CONFIGS
dependencies: fuse

complaint:
Expand Down Expand Up @@ -998,24 +998,24 @@ emborg with configs:
> 614B tests/configs/settings
> 671B tests/configs/test3
> 965B tests/configs/test4
> 1.84kB tests/configs/README
> Total size = 7.34kB.
> 1.85kB tests/configs/README
> Total size = 7.35kB.
expected_type: regex

intercom:
remove: configs tests
args: --quiet --config test6 extract -f tests/configs
cmp_dirs: CONFIGS tests/configs
cmp_dirs: STARTING_CONFIGS tests/configs

embellish:
remove: configs tests
args: --quiet --config test6 extract -f /⟪EMBORG⟫/tests/configs
cmp_dirs: CONFIGS tests/configs
cmp_dirs: STARTING_CONFIGS tests/configs

rating:
remove: configs tests
args: --quiet --config test6 restore configs
cmp_dirs: CONFIGS configs
cmp_dirs: STARTING_CONFIGS configs

clampdown:
args: --quiet --config test6 mount
Expand Down Expand Up @@ -1068,11 +1068,11 @@ emborg with configs:
louse:
remove: configs
args: --quiet --config test7 restore configs
cmp_dirs: CONFIGS configs
cmp_dirs: STARTING_CONFIGS configs

sweetener:
args: --quiet --config test7 mount
cmp_dirs: EMBORG/⟪EMBORG⟫/tests/configs CONFIGS
cmp_dirs: EMBORG/⟪EMBORG⟫/tests/configs STARTING_CONFIGS
dependencies: fuse

florist:
Expand Down Expand Up @@ -1210,22 +1210,22 @@ emborg with configs:
bathmat:
remove: configs/subdir/file
args: --quiet --config test8 extract -f configs.symlink/subdir/file
cmp_dirs: CONFIGS/subdir ./⟪EMBORG⟫/tests/configs/subdir
cmp_dirs: STARTING_CONFIGS/subdir ./⟪EMBORG⟫/tests/configs/subdir

allot:
remove: configs/subdir/file
args: --quiet --config test8 extract -f /⟪EMBORG⟫/tests/configs.symlink/subdir/file
cmp_dirs: CONFIGS/subdir ./⟪EMBORG⟫/tests/configs/subdir
cmp_dirs: STARTING_CONFIGS/subdir ./⟪EMBORG⟫/tests/configs/subdir

clutter:
remove: configs/subdir
args: --quiet --config test8 restore configs/subdir
cmp_dirs: CONFIGS/subdir configs/subdir
cmp_dirs: STARTING_CONFIGS/subdir configs/subdir

interior:
remove: configs/subdir/file
args: --quiet --config test8 restore configs/subdir/file
cmp_dirs: CONFIGS/subdir configs/subdir
cmp_dirs: STARTING_CONFIGS/subdir configs/subdir

craftsman:
args: --quiet --config test8 mount
Expand Down
4 changes: 2 additions & 2 deletions tests/test_emborg.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def get_result(self):
def initialize(dependency_options):
with cd(tests_dir):
rm("configs .config .local repositories configs.symlink".split())
cp("CONFIGS", "configs")
cp("STARTING_CONFIGS", "configs")
mkdir(".config repositories .local".split())
ln("~/.local/bin", ".local/bin")
ln("~/.local/lib", ".local/lib")
Expand All @@ -195,7 +195,7 @@ def initialize(dependency_options):
@pytest.fixture(scope="session")
def initialize_configs(initialize, dependency_options):
with cd(tests_dir):
cp("CONFIGS", ".config/emborg")
cp("STARTING_CONFIGS", ".config/emborg")
rm(".config/emborg/subdir")
for p in lsf(".config/emborg"):
contents = p.read_text()
Expand Down

0 comments on commit 2f8c0ad

Please sign in to comment.