示例#1
0
 def test_check_parser_source_files(self):
     self.assertTrue(len(_parser.SOURCE_HASH) >= 32)
     hashsrc.check_parser_source_files(_parser)
示例#2
0
from beancount.parser import _parser
from beancount.parser import grammar
from beancount.parser import printer
from beancount.parser import hashsrc
from beancount.core import data
from beancount.core.number import MISSING

# pylint: disable=unused-import
from beancount.parser.grammar import ParserError
from beancount.parser.grammar import ParserSyntaxError
from beancount.parser.grammar import DeprecatedError

# When importing the module, always check that the compiled source matched the
# installed source.
hashsrc.check_parser_source_files(_parser)


def is_posting_incomplete(posting):
    """Detect the presence of any elided amounts in a Posting.

    If any of the possible amounts are missing, this returns True.

    Args:
      entries: A directive.
    Returns:
      A boolean, true if there are some missing portions of any postings found.
    """
    units = posting.units
    if (units is MISSING or units.number is MISSING
            or units.currency is MISSING):
示例#3
0
 def test_check_parser_source_files(self):
     hashsrc.check_parser_source_files()