Skip to content

Commit f29a4fd

Browse files
committed
Fix example directory names in unit tests
1 parent 827cefc commit f29a4fd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/02-callback-function/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This example shows how you can set up DiffSync to invoke a callback function to
77

88
```python
99
from diffsync.logging import enable_console_logging
10-
from example2 import DiffSync1, DiffSync2, print_callback
10+
from main import DiffSync1, DiffSync2, print_callback
1111

1212
enable_console_logging(verbosity=0) # Show WARNING and ERROR logs only
1313

examples/02-callback-function/example2.py renamed to examples/02-callback-function/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DiffSync1(DiffSync):
3737

3838
top_level = ["number"]
3939

40-
def populate(self, count):
40+
def load(self, count): # pylint: disable=arguments-differ
4141
"""Construct Numbers from 1 to count."""
4242
for i in range(count):
4343
self.add(Number(number=(i + 1)))
@@ -50,7 +50,7 @@ class DiffSync2(DiffSync):
5050

5151
top_level = ["number"]
5252

53-
def populate(self, count):
53+
def load(self, count): # pylint: disable=arguments-differ
5454
"""Construct count numbers in the range (1 - 2*count)."""
5555
prev = 0
5656
for i in range(count): # pylint: disable=unused-variable

tests/unit/test_examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323

2424
def test_example_1():
2525
"""Test that the "example1" script runs successfully."""
26-
example1_dir = join(EXAMPLES, "example1")
26+
example1_dir = join(EXAMPLES, "01-multiple-data-sources")
2727
example1_main = join(example1_dir, "main.py")
2828
# Run it and make sure it doesn't raise an exception or otherwise exit with a non-zero code.
2929
subprocess.run(example1_main, cwd=example1_dir, check=True)
3030

3131

3232
def test_example_2():
3333
"""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")
3636
# Run it and make sure it doesn't raise an exception or otherwise exit with a non-zero code.
3737
subprocess.run(example2_main, cwd=example2_dir, check=True)

0 commit comments

Comments
 (0)