Skip to content

Commit 7057af7

Browse files
committed
fix tree output sorting consistency using sort by "version"
1 parent e56d2ef commit 7057af7

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

chapter_01.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,18 @@ and a subfolder called _superlists_, with more stuff inside it:
170170
├── geckodriver.log
171171
├── manage.py
172172
└── superlists
173-
├── asgi.py
174173
├── __init__.py
174+
├── asgi.py
175175
├── settings.py
176176
├── urls.py
177177
└── wsgi.py
178178
----
179179

180-
NOTE: Make sure your project folder looks exactly like this! If you
181-
see two nested folders called superlists, it's because you forgot the "."
182-
above. Delete them and try again, or there will be lots of confusion
180+
NOTE: Make sure your project folder looks exactly like this!
181+
If you see two nested folders called superlists,
182+
it's because you forgot the "." above.
183+
Delete them and try again,
184+
or there will be lots of confusion
183185
with paths and working directories...
184186

185187
The _superlists_ folder is intended for stuff that applies to the whole project--like _settings.py_,

chapter_unit_test_first_view.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ like models, views, and, of immediate interest to us, tests:
6565
├── db.sqlite3
6666
├── functional_tests.py
6767
├── lists
68+
│   ├── __init__.py
6869
│   ├── admin.py
6970
│   ├── apps.py
70-
│   ├── __init__.py
7171
│   ├── migrations
7272
│   │   └── __init__.py
7373
│   ├── models.py
7474
│   ├── tests.py
7575
│   └── views.py
7676
├── manage.py
7777
└── superlists
78-
├── asgi.py
7978
├── __init__.py
8079
├── __pycache__
80+
├── asgi.py
8181
├── settings.py
8282
├── urls.py
8383
└── wsgi.py

tests/book_tester.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,8 @@ def replace_command_with_check(self, pos, old, new):
569569
self.listings[pos] = new_listing
570570

571571

572-
573572
def assert_directory_tree_correct(self, expected_tree, cwd=None):
574-
actual_tree = self.sourcetree.run_command('tree -I *.pyc --noreport', cwd)
573+
actual_tree = self.sourcetree.run_command('tree -v -I *.pyc --noreport', cwd)
575574
self.assert_console_output_correct(actual_tree, expected_tree)
576575

577576

tests/test_chapter_01.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def test_listings_and_commands_and_output(self):
3333

3434
# sanity checks
3535
self.assertEqual(type(self.listings[0]), CodeListing)
36-
# self.assertEqual(self.listings[1].skip, True)
3736

3837
self.skip_with_check(6, 'Performing system checks...') # after runserver
3938
self.listings[8] = Output(str(self.listings[8]).replace('$', ''))
@@ -47,7 +46,6 @@ def test_listings_and_commands_and_output(self):
4746
print(self.pos)
4847
self.recognise_listing_and_process_it()
4948

50-
5149
self.assert_all_listings_checked(self.listings)
5250

5351
# manually add repo, we didn't do it at the beginning

0 commit comments

Comments
 (0)