Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failing NoSectionError #61

Closed
benjimin opened this issue Feb 26, 2019 · 2 comments
Closed

Test failing NoSectionError #61

benjimin opened this issue Feb 26, 2019 · 2 comments

Comments

@benjimin
Copy link
Collaborator

python tests/run.py

======================================================================
ERROR: test_readCSV (tests.test_columns.TestReadCSV)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/g/data1a/w85/brl654/tcrm/tests/test_columns.py", line 33, in test_readCSV
    loadedData = columns.colReadCSV(self.configFile, self.inputFile, self.source)
  File "/g/data1a/w85/brl654/tcrm/Utilities/columns.py", line 34, in colReadCSV
    delimiter = config.get(source, 'FieldDelimiter')
  File "/g/data/w85/brl654/conda/envs/tcrm/lib/python2.7/ConfigParser.py", line 330, in get
    raise NoSectionError(section)
NoSectionError: No section: 'TEST'

python tests/test_columns.py

OK
@benjimin
Copy link
Collaborator Author

benjimin commented Apr 8, 2019

Looks like the configparser subclass recognises that a config file has already been read (by a previous test) and so, in a broken attempt to prevent unnecessarily parsing "the" file repeatedly, silently declines to parse any further files.

(This bug relates to the use of singleton-pattern and the pervasively-widespread argument-passing of the config-filename. In other words, implicit dependence upon mutable global state. See also issue #68 and #65.)

@benjimin benjimin mentioned this issue Apr 11, 2019
@benjimin
Copy link
Collaborator Author

Fixed (without attacking broader issues) in commit 53733c1, merged in v2.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant