File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
examples/02-callback-function Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This example shows how you can set up DiffSync to invoke a callback function to
7
7
8
8
``` python
9
9
from diffsync.logging import enable_console_logging
10
- from example2 import DiffSync1, DiffSync2, print_callback
10
+ from main import DiffSync1, DiffSync2, print_callback
11
11
12
12
enable_console_logging(verbosity = 0 ) # Show WARNING and ERROR logs only
13
13
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class DiffSync1(DiffSync):
37
37
38
38
top_level = ["number" ]
39
39
40
- def populate (self , count ):
40
+ def load (self , count ): # pylint: disable=arguments-differ
41
41
"""Construct Numbers from 1 to count."""
42
42
for i in range (count ):
43
43
self .add (Number (number = (i + 1 )))
@@ -50,7 +50,7 @@ class DiffSync2(DiffSync):
50
50
51
51
top_level = ["number" ]
52
52
53
- def populate (self , count ):
53
+ def load (self , count ): # pylint: disable=arguments-differ
54
54
"""Construct count numbers in the range (1 - 2*count)."""
55
55
prev = 0
56
56
for i in range (count ): # pylint: disable=unused-variable
Original file line number Diff line number Diff line change 23
23
24
24
def test_example_1 ():
25
25
"""Test that the "example1" script runs successfully."""
26
- example1_dir = join (EXAMPLES , "example1 " )
26
+ example1_dir = join (EXAMPLES , "01-multiple-data-sources " )
27
27
example1_main = join (example1_dir , "main.py" )
28
28
# Run it and make sure it doesn't raise an exception or otherwise exit with a non-zero code.
29
29
subprocess .run (example1_main , cwd = example1_dir , check = True )
30
30
31
31
32
32
def test_example_2 ():
33
33
"""Test that the "example2" script runs successfully."""
34
- example2_dir = join (EXAMPLES , "example2 " )
35
- example2_main = join (example2_dir , "example2 .py" )
34
+ example2_dir = join (EXAMPLES , "02-callback-function " )
35
+ example2_main = join (example2_dir , "main .py" )
36
36
# Run it and make sure it doesn't raise an exception or otherwise exit with a non-zero code.
37
37
subprocess .run (example2_main , cwd = example2_dir , check = True )
You can’t perform that action at this time.
0 commit comments