Skip to content
Snippets Groups Projects
Commit 82e8c51c authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Remove usage of nose.tools

parent c9698233
Branches
Tags
1 merge request!76Resolve "Remove nose.tools dependency"
Pipeline #49495 passed with warnings
......@@ -26,7 +26,7 @@
@author: Timm Fitschen
"""
import caosdb as db
import linkahead as db
def test_messages_dict_behavior():
......
......@@ -28,12 +28,20 @@
from __future__ import absolute_import
import caosdb as db
from nose.tools import (assert_equal,
assert_raises,
assert_false,
assert_is_none,
assert_is_not_none)
import linkahead as db
def assert_equal(a, b):
assert a == b
def assert_is_not_none(a):
assert a is not None
def assert_false(a):
assert not a
def assert_is_none(a):
assert a is None
from pytest import raises, mark
......
......@@ -26,7 +26,10 @@ import caosdb
def test_recordtypes():
from nose.tools import assert_is_not_none # @UnresolvedImport
def assert_is_not_none(obj):
assert obj is not None
from sys import hexversion
from sys import maxsize as maxint # @Reimport
from random import randint
......@@ -99,7 +102,15 @@ def test_recordtypes():
def test_record_types_as_reference_properties():
from nose.tools import assert_is_not_none, assert_true, assert_equal # @UnresolvedImport
def assert_is_not_none(obj):
assert obj is not None
def assert_true(obj):
assert obj is True
def assert_equal(obj1, obj2):
assert obj1 == obj2
try:
"""recordtype without any property."""
......
......@@ -31,13 +31,15 @@ import pytest
@pytest.mark.local_server
def test_parse_xml():
from lxml import etree
from nose.tools import assert_equal # @UnresolvedImport
from caosdb.common.models import File
from caosdb.common.models import parse_xml
from caosdb.common.models import Parent
from caosdb.common.models import Property
from caosdb.common.models import Message
from caosdb import INTEGER
from linkahead.common.models import File
from linkahead.common.models import parse_xml
from linkahead.common.models import Parent
from linkahead.common.models import Property
from linkahead.common.models import Message
from linkahead import INTEGER
def assert_equal(a, b):
assert a == b
# define test file xml
tmp_name = 'filename'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment