Skip to content

Commit 6e3dabd

Browse files
committed
Solve bugs from configuration node port test and node port fn dependency.
1 parent d98278f commit 6e3dabd

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

source/ports/node_port/test/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ describe('metacall', () => {
204204
assert.strictEqual(py_encode_basestring_ascii('asd'), '"asd"');
205205
});
206206
it('require (py submodule dependency)', () => {
207-
// Require the 'op' submodule from 'fn' Python package
208-
const { foldr, call } = require('fn.op');
207+
// Require the 'core' submodule from 'rsa' Python package
208+
const { encrypt_int } = require('rsa.core');
209209

210-
assert.strictEqual(foldr(call, 10)([s => s * s, k => k + 10]), 400);
210+
assert.strictEqual(encrypt_int(3, 2, 5), 4);
211211
});
212212
it('require (rb)', () => {
213213
const cache = require('./cache.rb');

source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ target_compile_definitions(${target}
9696
PRIVATE
9797
${DEFAULT_COMPILE_DEFINITIONS}
9898

99+
# Python Port path
100+
METACALL_PYTHON_PORT_PATH="${CMAKE_SOURCE_DIR}/source/ports/py_port"
101+
99102
# NodeJS Port path
100103
METACALL_NODE_PORT_PATH="${CMAKE_SOURCE_DIR}/source/ports/node_port/index.js"
101104

source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ TEST_F(metacall_load_configuration_node_python_test, DefaultConstructor)
3434

3535
ASSERT_EQ((int)0, (int)metacall_initialize());
3636

37+
ASSERT_EQ((int)0, (int)metacall_execution_path("py", METACALL_PYTHON_PORT_PATH));
38+
3739
static const char buffer[] =
3840
"const { metacall_load_from_configuration_export } = require('" METACALL_NODE_PORT_PATH "');\n"
3941
"const config = metacall_load_from_configuration_export('" METACALL_TEST_CONFIG_PATH "');\n"

tools/metacall-environment.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function sub-python {
101101
pip3 install setuptools
102102
pip3 install wheel
103103
pip3 install rsa
104-
pip3 install fn
105104
pip3 install scipy
106105
pip3 install numpy
107106
pip3 install scikit-learn

tools/metacall-environment.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ sub_python(){
113113
$SUDO_CMD pip3 install setuptools
114114
$SUDO_CMD pip3 install wheel
115115
$SUDO_CMD pip3 install rsa
116-
$SUDO_CMD pip3 install fn
117116
$SUDO_CMD pip3 install scipy
118117
$SUDO_CMD pip3 install numpy
119118
$SUDO_CMD pip3 install scikit-learn

0 commit comments

Comments
 (0)