File: test_ncrc.py

package info (click to toggle)
netcdf4-python 1.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,604 kB
  • sloc: python: 6,057; ansic: 854; makefile: 15; sh: 2
file content (20 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest
import netCDF4
from netCDF4 import __has_nc_rc_set__

class NCRCTestCase(unittest.TestCase):
    def setUp(self):
        pass

    def tearDown(self):
        pass

    def runTest(self):
        """test rc_get, rc_set functions"""
        if __has_nc_rc_set__:
            netCDF4.rc_set('foo','bar')
            assert netCDF4.rc_get('foo') == 'bar'
            assert netCDF4.rc_get('bar') == None

if __name__ == '__main__':
    unittest.main()