Skip to content

Commit fa13166

Browse files
committed
Add minimal code to make the python tests pass
Adds default parameter value for isArchivable function to bindings. This is not matching the behaviour of the C++ API. Signed-off-by: Kevin Wheatley <[email protected]>
1 parent a324080 commit fa13166

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/bindings/python/PyConfig.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,13 +894,18 @@ void bindPyConfig(py::module & m)
894894
DOC(Config, setProcessorCacheFlags))
895895

896896
// Archiving
897-
.def("isArchivable", &Config::isArchivable, DOC(Config, isArchivable))
897+
.def("isArchivable", [](ConfigRcPtr & self, bool minimal)
898+
{
899+
return self->isArchivable(minimal);
900+
},
901+
py::arg("minimal") = false,
902+
DOC(Config, isArchivable))
898903
.def("archive", [](ConfigRcPtr & self, const char * filepath)
899904
{
900905
std::ofstream f(filepath, std::ofstream::out | std::ofstream::binary);
901906
self->archive(f, ARCHIVE_FLAGS_DEFAULT); // TODO: pass flags in rather than default
902907
f.close();
903-
},
908+
},
904909
DOC(Config, archive))
905910

906911
// Conversion to string

0 commit comments

Comments
 (0)