{"action":"created","issue":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1322","labels_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1322/labels{/name}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1322/comments","events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1322/events","html_url":"https://github.com/hpcugent/easybuild-framework/issues/1322","id":94886526,"number":1322,"title":"dump does not use `%(versionsuffix)s` template if versionsuffix starts with `-`","user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-14T07:41:02Z","updated_at":"2015-07-14T07:41:54Z","closed_at":null,"body":"enhanced one of the tests:\r\n\r\n```\r\ndiff --git a/test/framework/easyconfig.py b/test/framework/easyconfig.py\r\nindex b5f2bbc..c798bff 100644\r\n--- a/test/framework/easyconfig.py\r\n+++ b/test/framework/easyconfig.py\r\n@@ -1260,6 +1260,7 @@ class EasyConfigTest(EnhancedTestCase):\r\n             r\"homepage = 'http://foo.com/'\",\r\n             r'description = \"foo description\"',  # no templating for description\r\n             r\"sources = \\[SOURCELOWER_TAR_GZ\\]\",\r\n+            r\"dependencies = \\[('bar', '1.2.3', '%(versionsuffix)s')\\]\",\r\n             r\"preconfigopts = '--opt1=%\\(name\\)s'\",\r\n             r\"configopts = '--opt2=%\\(version\\)s'\",\r\n             r\"sanity_check_paths = {'files': \\['files/%\\(namelower\\)s/foobar'\\]\",\r\n```\r\n\r\nyields:\r\n\r\n```\r\n$ python -m test.framework.easyconfig 2>&1 | tee eb.log\r\nCouldn't import dot_parser, loading of dot files will not be possible.\r\n.......F........................\r\n======================================================================\r\nFAIL: test_dump_template (__main__.EasyConfigTest)\r\nTest EasyConfig's dump() method for files containing templates\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/kehoste/work/easybuild-framework/test/framework/easyconfig.py\", line 1271, in test_dump_template\r\n    self.assertTrue(regex.search(ectxt), \"Pattern '%s' found in: %s\" % (regex.pattern, ectxt))\r\nAssertionError: Pattern 'dependencies = \\[('bar', '1.2.3', '%(versionsuffix)s')\\]' found in: easyblock = 'EB_foo'\r\n\r\nname = 'Foo'\r\nversion = '0.0.1'\r\nversionsuffix = '-test'\r\n\r\nhomepage = 'http://foo.com/'\r\ndescription = \"foo description\"\r\n\r\ntoolchain = {'version': 'dummy', 'name': 'dummy'}\r\n\r\nsources = [SOURCELOWER_TAR_GZ]\r\n\r\ndependencies = [('bar', '1.2.3', '-test')]\r\n\r\npreconfigopts = '--opt1=%(name)s'\r\nconfigopts = '--opt2=%(version)s'\r\n\r\nfoo_extra1 = 'foobar'\r\n\r\nsanity_check_paths = {'files': ['files/%(namelower)s/foobar'], 'dirs': []}\r\n\r\n----------------------------------------------------------------------\r\nRan 32 tests in 15.798s\r\n\r\nFAILED (failures=1)\r\n```\r\n\r\nversionsuffix that starts with `_` works as expected"},"comment":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/comments/121154462","html_url":"https://github.com/hpcugent/easybuild-framework/issues/1322#issuecomment-121154462","issue_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1322","id":121154462,"user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T07:41:54Z","updated_at":"2015-07-14T07:41:54Z","body":"@Caylo: can you figure out what's going wrong here? I suspect this has something to do with the regex used to search not being escaped (correctly)?"}}