mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
Fix: Missing newline makes tests fail
This commit is contained in:
+10
-6
@@ -3,25 +3,25 @@ Test library.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import difflib
|
import difflib
|
||||||
|
import http.server
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import subprocess
|
|
||||||
import os
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
|
import pprint
|
||||||
import re
|
import re
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
|
import socketserver
|
||||||
import string
|
import string
|
||||||
|
import subprocess
|
||||||
import threading
|
import threading
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import pprint
|
|
||||||
import socketserver
|
|
||||||
import http.server
|
|
||||||
from uuid import uuid4
|
|
||||||
from pathlib import Path
|
|
||||||
import zlib
|
import zlib
|
||||||
|
from pathlib import Path
|
||||||
|
from uuid import uuid4
|
||||||
|
|
||||||
|
|
||||||
def ungzip_if_required(output):
|
def ungzip_if_required(output):
|
||||||
@@ -458,6 +458,10 @@ class BaseTest(object):
|
|||||||
a = match_prepare(a)
|
a = match_prepare(a)
|
||||||
b = match_prepare(b)
|
b = match_prepare(b)
|
||||||
|
|
||||||
|
# strip trailing whitespace and newlines
|
||||||
|
a = a.strip()
|
||||||
|
b = b.strip()
|
||||||
|
|
||||||
if a != b:
|
if a != b:
|
||||||
diff = "".join(difflib.unified_diff(
|
diff = "".join(difflib.unified_diff(
|
||||||
[l + "\n" for l in a.split("\n")], [l + "\n" for l in b.split("\n")]))
|
[l + "\n" for l in a.split("\n")], [l + "\n" for l in b.split("\n")]))
|
||||||
|
|||||||
Reference in New Issue
Block a user