drop plus_one test

This commit is contained in:
Damien Elmes 2020-01-17 18:54:38 -07:00
parent 12c60f20fe
commit bead03e858
4 changed files with 0 additions and 18 deletions

View file

@ -16,8 +16,6 @@ message BackendInput {
BrowserRowsIn browser_rows = 20;
RenderCardIn render_card = 21;
int64 local_minutes_west = 22;
PlusOneIn plus_one = 2046; // temporary, for testing
}
}
@ -31,8 +29,6 @@ message BackendOutput {
RenderCardOut render_card = 21;
sint32 local_minutes_west = 22;
PlusOneOut plus_one = 2046; // temporary, for testing
BackendError error = 2047;
}
}

View file

@ -88,11 +88,6 @@ class RustBackend:
else:
return output
def plus_one(self, num: int) -> int:
input = pb.BackendInput(plus_one=pb.PlusOneIn(num=num))
output = self._run_command(input)
return output.plus_one.num
def template_requirements(
self, template_fronts: List[str], field_map: Dict[str, int]
) -> AllTemplateReqs:

View file

@ -31,9 +31,6 @@ def Collection(
) -> _Collection:
"Open a new or existing collection. Path must be unicode."
backend = RustBackend(path)
# fixme: this call is temporarily here to ensure the brige is working
# on all platforms, and should be removed in a future beta
assert backend.plus_one(5) == 6
assert path.endswith(".anki2")
path = os.path.abspath(path)
create = not os.path.exists(path)

View file

@ -88,7 +88,6 @@ impl Backend {
Value::TemplateRequirements(input) => {
OValue::TemplateRequirements(self.template_requirements(input)?)
}
Value::PlusOne(input) => OValue::PlusOne(self.plus_one(input)?),
Value::SchedTimingToday(input) => {
OValue::SchedTimingToday(self.sched_timing_today(input))
}
@ -102,11 +101,6 @@ impl Backend {
})
}
fn plus_one(&self, input: pt::PlusOneIn) -> Result<pt::PlusOneOut> {
let num = input.num + 1;
Ok(pt::PlusOneOut { num })
}
fn template_requirements(
&self,
input: pt::TemplateRequirementsIn,