Skip to content

Commit c55bdf7

Browse files
committed
Fix tests
The added EC and EasyBlock requires changes to the expected output in some tests.
1 parent 1622322 commit c55bdf7

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

test/framework/docs.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
LIST_EASYBLOCKS_SIMPLE_TXT = """EasyBlock
4646
|-- bar
47+
|-- Cargo
4748
|-- ConfigureMake
4849
| |-- MakeCp
4950
|-- EB_EasyBuildMeta
@@ -76,6 +77,7 @@
7677

7778
LIST_EASYBLOCKS_DETAILED_TXT = """EasyBlock (easybuild.framework.easyblock)
7879
|-- bar (easybuild.easyblocks.generic.bar @ %(topdir)s/generic/bar.py)
80+
|-- Cargo (easybuild.easyblocks.generic.cargo @ %(topdir)s/generic/cargo.py)
7981
|-- ConfigureMake (easybuild.easyblocks.generic.configuremake @ %(topdir)s/generic/configuremake.py)
8082
| |-- MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)
8183
|-- EB_EasyBuildMeta (easybuild.easyblocks.easybuildmeta @ %(topdir)s/e/easybuildmeta.py)
@@ -109,6 +111,7 @@
109111
LIST_EASYBLOCKS_SIMPLE_RST = """* **EasyBlock**
110112
111113
* bar
114+
* Cargo
112115
* ConfigureMake
113116
114117
* MakeCp
@@ -157,6 +160,7 @@
157160
LIST_EASYBLOCKS_DETAILED_RST = """* **EasyBlock** (easybuild.framework.easyblock)
158161
159162
* bar (easybuild.easyblocks.generic.bar @ %(topdir)s/generic/bar.py)
163+
* Cargo (easybuild.easyblocks.generic.cargo @ %(topdir)s/generic/cargo.py)
160164
* ConfigureMake (easybuild.easyblocks.generic.configuremake @ %(topdir)s/generic/configuremake.py)
161165
162166
* MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)
@@ -204,6 +208,7 @@
204208

205209
LIST_EASYBLOCKS_SIMPLE_MD = """- **EasyBlock**
206210
- bar
211+
- Cargo
207212
- ConfigureMake
208213
- MakeCp
209214
- EB_EasyBuildMeta
@@ -236,6 +241,7 @@
236241

237242
LIST_EASYBLOCKS_DETAILED_MD = """- **EasyBlock** (easybuild.framework.easyblock)
238243
- bar (easybuild.easyblocks.generic.bar @ %(topdir)s/generic/bar.py)
244+
- Cargo (easybuild.easyblocks.generic.cargo @ %(topdir)s/generic/cargo.py)
239245
- ConfigureMake (easybuild.easyblocks.generic.configuremake @ %(topdir)s/generic/configuremake.py)
240246
- MakeCp (easybuild.easyblocks.generic.makecp @ %(topdir)s/generic/makecp.py)
241247
- EB_EasyBuildMeta (easybuild.easyblocks.easybuildmeta @ %(topdir)s/e/easybuildmeta.py)
@@ -513,7 +519,7 @@ def test_get_easyblock_classes(self):
513519
# result should correspond with test easyblocks in test/framework/sandbox/easybuild/easyblocks/generic
514520
eb_classes = get_easyblock_classes('easybuild.easyblocks.generic')
515521
eb_names = [x.__name__ for x in eb_classes]
516-
expected = ['ConfigureMake', 'DummyExtension', 'MakeCp', 'ModuleRC',
522+
expected = ['Cargo', 'ConfigureMake', 'DummyExtension', 'MakeCp', 'ModuleRC',
517523
'PythonBundle', 'Toolchain', 'Toy_Extension', 'bar']
518524
self.assertEqual(sorted(eb_names), expected)
519525

@@ -724,6 +730,7 @@ def test_list_software(self):
724730
'homepage: https://easybuilders.github.io/easybuild',
725731
'',
726732
" * toy v0.0: gompi/2018a, system",
733+
" * toy v0.0 (versionsuffix: '-cargo'): system",
727734
" * toy v0.0 (versionsuffix: '-deps'): system",
728735
" * toy v0.0 (versionsuffix: '-iter'): system",
729736
" * toy v0.0 (versionsuffix: '-multiple'): system",
@@ -746,6 +753,7 @@ def test_list_software(self):
746753
'version versionsuffix toolchain',
747754
'======= ============= ===========================',
748755
'``0.0`` ``gompi/2018a``, ``system``',
756+
'``0.0`` ``-cargo`` ``system``',
749757
'``0.0`` ``-deps`` ``system``',
750758
'``0.0`` ``-iter`` ``system``',
751759
'``0.0`` ``-multiple`` ``system``',

test/framework/filetools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2470,11 +2470,13 @@ def test_index_functions(self):
24702470
# load_index just returns None if there is no index in specified directory
24712471
self.assertEqual(ft.load_index(self.test_prefix), None)
24722472

2473+
num_files = len(glob.glob(test_ecs + '/**/*.*', recursive=True))
2474+
24732475
# create index for test easyconfigs;
24742476
# test with specified path with and without trailing '/'s
24752477
for path in [test_ecs, test_ecs + '/', test_ecs + '//']:
24762478
index = ft.create_index(path)
2477-
self.assertEqual(len(index), 92)
2479+
self.assertEqual(len(index), num_files)
24782480

24792481
expected = [
24802482
os.path.join('b', 'bzip2', 'bzip2-1.0.6-GCC-4.9.2.eb'),

test/framework/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ def test_000_list_easyblocks(self):
951951
expected = '\n'.join([
952952
r'EasyBlock',
953953
r'\|-- bar',
954+
r'\|-- Cargo',
954955
r'\|-- ConfigureMake',
955956
r'\| \|-- MakeCp',
956957
r'\|-- EB_EasyBuildMeta',

0 commit comments

Comments
 (0)