-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return #NAME? error for undefined variables, Fixes #2
- Loading branch information
1 parent
792c90c
commit a836ecb
Showing
4 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ | |
|
||
setup( | ||
name='hotxlfp', | ||
version='0.0.8', | ||
version='0.0.9', | ||
packages=['hotxlfp', 'hotxlfp._compat', 'hotxlfp._compat.py3', 'hotxlfp.helper', 'hotxlfp.formulas', 'hotxlfp.grammarparser'], | ||
license='MIT', | ||
test_suite='tests', | ||
author='Leonel Câmara', | ||
author_email='[email protected]', | ||
url='https://github.com/aidhound/hotxlfp', | ||
download_url='https://github.com/aidhound/hotxlfp/archive/0.0.8.tar.gz', | ||
download_url='https://github.com/aidhound/hotxlfp/archive/0.0.9.tar.gz', | ||
keywords=['excel', 'formula', 'parser'], | ||
install_requires=['ply', 'python-dateutil'], | ||
long_description='\n'.join(l for l in open('README.md', encoding="utf-8").readlines() if not l.startswith('[!')), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
import unittest | ||
from hotxlfp import Parser | ||
|
||
|
||
class TestVars(unittest.TestCase): | ||
|
||
def test_undefined(self): | ||
p = Parser() | ||
ret = p.parse("MY_VAR") | ||
self.assertEqual(ret['result'], None) | ||
self.assertEqual(ret['error'], '#NAME?') | ||
ret = p.parse("MY_VAR + 5") | ||
self.assertEqual(ret['result'], None) | ||
self.assertEqual(ret['error'], '#NAME?') | ||
ret = p.parse("5 + MY_VAR") | ||
self.assertEqual(ret['result'], None) | ||
self.assertEqual(ret['error'], '#NAME?') |