emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Unit-test for Please add support for dlangs packagemanager t


From: tbanelwebmin
Subject: Re: [PATCH] Unit-test for Please add support for dlangs packagemanager to ob-C.el
Date: Tue, 18 Oct 2022 21:46:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

For unit-testing Dlang, we could mock the «dub» command (compiler+packager). For instance, we could replace it by the «cat» Linux command, just while running the unit-test.

But the «cat» command introduces a new dependency on Linux. Is there a portable equivalent for «cat»?


On 10/2/22 09:29, Ihor Radchenko wrote:
Max Nikulin <manikulin@gmail.com> writes:

I am unsure concerning general policy related to org-babel test, so the 
following is rather discussion than a direct request to change the test.

Is there a way to avoid dependency on remote resources? My concern is 
test results affected by network issues. In addition, more required 3rd 
party tools means less probability that a developer after modification 
of generic babel code noticed that the changes break D backend because 
missing tool on the development machine. I have no idea how much efforts 
is required to create a mock for isolated environment.
Tests must not rely on remote resources.
However, it does not mean that we cannot test remote resources in Org
tests. One simply needs to mock the url-retrieve or whatever function is
used to retrieve remove resource.

Another point is that missed dub binary is not reflected in test report. 
If `skip-unless' feature of ert is available in Emacs-26 then it should 
be used.
The current approach to optional binaries is throwing
'missing-test-dependency error when the binary is not available.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]