Sorry,
above errors were on the master branch. On the v2 there is just one error
with *setup_test.py*
=========================================================== FAILURES
============================================================
_____________________________________________________ TestSetup.test_setup
______________________________________________________
self = <beancount.scripts.setup_test.TestSetup testMethod=test_setup>
@unittest.skipIf(is_bazel_build(), "Cannot setup within Bazel.")
def test_setup(self):
# We need to create the installation target directory and have our
# PYTHONPATH set on it in order for setuptools to work properly in a
# temporary installation directory. Otherwise it fails and spits
out a
# large error message with instructions on how to work with
setuptools.
site_packages_path = path.join(
self.installdir,
'lib/python{vi.major:d}.{vi.minor:d}/site-packages'.format(
vi=sys.version_info))
os.makedirs(site_packages_path)
> self.run_setup(self.installdir, {'PYTHONPATH': site_packages_path})
beancount/scripts/setup_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
beancount/scripts/setup_test.py:86: in run_setup
self.assertEqual(0, pipe.returncode, stderr)
E AssertionError: 0 != 1 :
b"/usr/lib/python3/dist-packages/setuptools/dist.py:473: UserWarning:
Normalizing '2.3.2-dev' to '2.3.2.dev0'\n warnings.warn(\nerror: could not
create 'build/bdist.linux-x86_64/egg': Permission denied\n"
==================================================== short test summary
info ====================================================
FAILED beancount/scripts/setup_test.py::TestSetup::test_setup -
AssertionError: 0 != 1 : b"/usr/lib/python3/dist-packages/setu...
=============================== 1 failed, 1680 passed, 24 skipped, 2
xfailed in 108.89s (0:01:48) ===============================
On Thursday, August 13, 2020 at 4:44:22 PM UTC+2 Chary Chary wrote:
> I see it complains about permissions to ''tmp/index.html', but I ran it
> with root privileges.
>
> On Thursday, August 13, 2020 at 4:23:37 PM UTC+2 Chary Chary wrote:
>
>> Martin,
>>
>> thanks! I get few errors. Is this OK?
>>
>> ===============================
>> =================================================================
>> FAILURES =================================================================
>> ____________________________________________________
>> TestWillReport.test_create_report
>> _____________________________________________________
>>
>> self = <beancount.projects.will_test.TestWillReport
>> testMethod=test_create_report>
>> entries = [Open(meta={'filename': '<string>', 'lineno': 5, 'institution':
>> 'Bank of America', 'address': '100 North Tryon Street,... '<string>',
>> 'lineno': 30}, date=datetime.date(2010, 1, 1), account='Income:Misc',
>> currencies=None, booking=None), ...]
>> _ = []
>> options_map = {'account_current_conversions': 'Conversions:Current',
>> 'account_current_earnings': 'Earnings:Current',
>> 'account_previous_balances': 'Opening-Balances',
>> 'account_previous_conversions': 'Conversions:Previous', ...}
>>
>> @loader.load_doc()
>> def test_create_report(self, entries, _, options_map):
>> """
>> option "title" "Report Creation Test"
>>
>> ;; Two accounts in the same institution.
>> 2010-01-01 open Assets:US:BofA
>> institution: "Bank of America"
>> address: "100 North Tryon Street, Charlotte, NC 28255"
>> phone: "1.800.933.6262 <(800)%20933-6262>"
>> website: "https://www.bankofamerica.com"
>>
>> 2010-01-01 open Assets:US:BofA:Checking
>> type: "Checking Account"
>> number: "43865450874"
>>
>> 2010-01-01 open Assets:US:BofA:Savings
>> type: "Savings Account"
>> number: "83470650273"
>>
>> ;; An an account with a zero balance.
>> 2010-01-01 open Liabilities:US:BofA:CreditCard
>> institution: "Bank of America"
>> number: "3478.4744.2339.0011"
>>
>> ;; With a non-zeo liabilities account.
>> 2010-01-01 open Liabilities:US:Chase:CreditCard
>> institution: "Chase Manhattan Bank"
>> address: "National Bank By Mail, P O Box 36520, Louisville,
>> KY 40233-6520"
>> number: "7654.0754.9375.0489"
>>
>> 2010-01-01 open Income:Misc
>>
>> 2014-02-03 *
>> Assets:US:BofA:Checking 3400.00 USD
>> Assets:US:BofA:Savings 1200.00 USD
>> Liabilities:US:Chase:CreditCard -820.00 USD
>> Income:Misc
>>
>> """
>> report = will.create_report(entries, options_map)
>> text = will.format_xhtml_report(report, options_map)
>> > with open('/tmp/index.html', 'w') as infile:
>> E PermissionError: [Errno 13] Permission denied: '/tmp/index.html'
>>
>> beancount/projects/will_test.py:139: PermissionError
>> __________________________________________________
>> TestSetup.test_sdist_includes_c_files
>> ___________________________________________________
>>
>> self = <beancount.scripts.setup_test.TestSetup
>> testMethod=test_sdist_includes_c_files>
>>
>> @unittest.skipIf(is_bazel_build(), "Cannot setup within Bazel.")
>> def test_sdist_includes_c_files(self):
>> # Clean previously built "build" output.
>> rootdir = test_utils.find_repository_root(__file__)
>> subprocess.check_call(
>> [sys.executable, 'setup.py', 'sdist', '--dist-dir',
>> self.installdir],
>> cwd=rootdir, shell=False,
>> stdout=subprocess.PIPE, stderr=subprocess.PIPE)
>> files = os.listdir(self.installdir)
>> self.assertEqual(1, len(files))
>> targz = path.join(self.installdir, files[0])
>>
>> # Find the set of expected header & C files.
>> exp_filenames = set()
>> for root, dirs, files in os.walk(path.join(rootdir, 'beancount')):
>> for filename in files:
>> if re.match(r'.*\.[hc]$', filename):
>> exp_filenames.add(path.join(root[len(rootdir)+1:],
>> filename))
>>
>> # Find the set of packaged files in the source distribution.
>> tar = tarfile.open(targz)
>> tar_filenames = set(re.sub('^.*?{}'.format(os.sep), '', info.name
>> )
>> for info in tar
>> if re.match(r'.*\.[hc]$', info.name))
>>
>> # Check that all the expected files are present.
>> > self.assertLessEqual(exp_filenames, tar_filenames)
>> E AssertionError: {'beancount/parser/parser.c',
>> 'beancount/parser/grammar.c', 'beancount/parser/macros.h',
>> 'beancount/parser/tokens_test.c', 'beancount/parser/parser.h',
>> 'beancount/parser/grammar.h', 'beancount/parser/tokens.h',
>> 'beancount/defs.h', 'beancount/ccore/account.h',
>> 'beancount/parser/lexer.c', 'beancount/parser/lexer.h'} not less than or
>> equal to {'beancount/parser/parser.c', 'beancount/parser/grammar.c',
>> 'beancount/parser/macros.h', 'beancount/parser/tokens_test.c',
>> 'beancount/parser/parser.h', 'beancount/parser/grammar.h',
>> 'beancount/parser/tokens.h', 'beancount/parser/lexer.c',
>> 'beancount/parser/lexer.h'}
>>
>> beancount/scripts/setup_test.py:161: AssertionError
>> ========================================================= short test
>> summary info ==========================================================
>> FAILED
>> beancount/projects/will_test.py::TestWillReport::test_create_report -
>> PermissionError: [Errno 13] Permission denied: '/tmp/index.h...
>> FAILED
>> beancount/scripts/setup_test.py::TestSetup::test_sdist_includes_c_files -
>> AssertionError: {'beancount/parser/parser.c', 'beancount...
>> ===================================== 2 failed, 1495 passed, 23 skipped,
>> 2 xfailed in 78.39s (0:01:18) =====================================
>> make: *** [Makefile:147: test] Error 1
>>
>>
>> =============================
>>
>> On Thursday, August 13, 2020 at 3:08:24 PM UTC+2 [email protected] wrote:
>>
>>> make test
>>>
>>> which is
>>>
>>> bergamot [git|v2]:~/p/beancount$ make -n test
>>> python3 -m pytest beancount
>>>
>>> In v3 (master):
>>> bazel test ...
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Aug 13, 2020 at 9:00 AM Chary Chary <[email protected]> wrote:
>>>
>>>> Dear all,
>>>>
>>>> can anybody suggest how one can run all beancount unittests (as they
>>>> are spread across many folders)?
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Beancount" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/beancount/fa186f31-aba1-4e0a-ab4c-80a7bd22b84cn%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/beancount/fa186f31-aba1-4e0a-ab4c-80a7bd22b84cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/e7eb687c-07e4-469e-bfc0-38c7fce3aa95n%40googlegroups.com.