We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba4287 commit 2c90645Copy full SHA for 2c90645
tests/test_jobs.py
@@ -0,0 +1,31 @@
1
+from pathlib import Path
2
+import time
3
+import pytest
4
+from nucleus import (
5
+ AsyncJob,
6
+ NucleusClient,
7
+)
8
+
9
10
+def test_reprs():
11
+ # Have to define here in order to have access to all relevant objects
12
+ def test_repr(test_object: any):
13
+ assert eval(str(test_object)) == test_object
14
15
+ client = NucleusClient(api_key="fake_key")
16
+ test_repr(
17
+ AsyncJob(
18
+ client=client,
19
+ job_id="fake_job_id",
20
+ job_last_known_status="fake_job_status",
21
+ job_type="fake_job_type",
22
+ job_creation_time="fake_job_creation_time",
23
+ )
24
25
26
27
+def test_job_creation_and_listing(CLIENT):
28
+ jobs = CLIENT.list_jobs()
29
30
+ for job in jobs:
31
+ assert eval(print(job)) == job
0 commit comments