test(solver): minor test case  refactor
@@ -165,19 +165,20 @@ def test_invalid_get_internals(solver):
def test_tqdm(solver, capfd):
solver.fit(max_epochs=20, tqdm_file=sys.stdout)
+ tqdm_desc = 'Training Progress'
stdout, stderr = capfd.readouterr()
- assert 'Training Progress: ' in stdout
- assert 'Training Progress: ' not in stderr
+ assert tqdm_desc in stdout
+ assert tqdm_desc not in stderr
solver.fit(max_epochs=20, tqdm_file=sys.stderr)
stdout, stderr = capfd.readouterr()
- assert 'Training Progress: ' not in stdout
- assert 'Training Progress: ' in stderr
+ assert tqdm_desc not in stdout
+ assert tqdm_desc in stderr
solver.fit(max_epochs=20, tqdm_file=None)
stdout, stderr = capfd.readouterr()
- assert 'Training Progress: ' not in stdout
- assert 'Training Progress: ' not in stderr
+ assert tqdm_desc not in stdout
+ assert tqdm_desc not in stderr
def test_generic_solver(solver):
