From 0f24930a9790851be99c0213335e1429d22824d9 Mon Sep 17 00:00:00 2001
From: Joscha Schmiedt <joscha@schmiedt.dev>
Date: Fri, 5 Apr 2024 22:34:04 +0200
Subject: [PATCH] STY: autopep8

---
 tests/test_affiliation.py     | 3 ++-
 tests/test_data_model_leap.py | 2 ++
 tests/test_deletion.py        | 6 ++++--
 tests/test_issues_server.py   | 3 ++-
 tests/test_list.py            | 2 +-
 tests/test_manual.py          | 7 ++++---
 tests/test_name_properties.py | 3 +++
 tests/test_permissions.py     | 7 +++++--
 tests/test_records.py         | 5 +++++
 tests/test_recordtypes.py     | 6 +++---
 10 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/tests/test_affiliation.py b/tests/test_affiliation.py
index 2b72cca..1234a72 100644
--- a/tests/test_affiliation.py
+++ b/tests/test_affiliation.py
@@ -31,13 +31,14 @@ import pytest
 from pytest import raises
 
 
-
 def assert_equal(a, b):
     assert a == b
 
+
 def assert_is_not_none(a):
     assert a is not None
 
+
 def setup_module():
     f = open(file_path, "w")
     f.write("hello, world!")
diff --git a/tests/test_data_model_leap.py b/tests/test_data_model_leap.py
index 6db2f65..c7e12d1 100644
--- a/tests/test_data_model_leap.py
+++ b/tests/test_data_model_leap.py
@@ -25,6 +25,8 @@
 
 @author: fitschen
 """
+
+
 def assert_equal(a, b):
     assert a == b
 
diff --git a/tests/test_deletion.py b/tests/test_deletion.py
index d73659b..2b795fd 100755
--- a/tests/test_deletion.py
+++ b/tests/test_deletion.py
@@ -27,19 +27,21 @@
 # A. Schlemmer, 08/2014
 
 
+import linkahead as h
 import pytest
 
+
 def assert_false(a):
     assert not a
 
+
 def assert_true(a):
     assert a
 
+
 def assert_equal(a, b):
     assert a == b
 
-import linkahead as h
-
 
 def setup_module():
     old = h.execute_query("FIND ENTITY WITH ID > 100")
diff --git a/tests/test_issues_server.py b/tests/test_issues_server.py
index 8bedd02..2922c49 100644
--- a/tests/test_issues_server.py
+++ b/tests/test_issues_server.py
@@ -1291,7 +1291,8 @@ def test_143_white_space(num):
     ]:
         with pytest.raises(TransactionError) as cm:
             db.execute_query(query)
-        assert cm.value.msg == f'You typed "{num}". Empty spaces are not allowed in numbers. Did you mean "{num.replace(" ", "")}"?'
+        assert cm.value.msg == f'You typed "{
+            num}". Empty spaces are not allowed in numbers. Did you mean "{num.replace(" ", "")}"?'
 
 
 def test_144():
diff --git a/tests/test_list.py b/tests/test_list.py
index f204124..a569fd0 100644
--- a/tests/test_list.py
+++ b/tests/test_list.py
@@ -28,7 +28,7 @@
 import os
 import linkahead as db
 from linkahead.exceptions import (TransactionError,
-                               UnqualifiedPropertiesError)
+                                  UnqualifiedPropertiesError)
 from pytest import raises
 
 
diff --git a/tests/test_manual.py b/tests/test_manual.py
index c9a18e1..0fbe09d 100644
--- a/tests/test_manual.py
+++ b/tests/test_manual.py
@@ -21,25 +21,26 @@
 #
 # ** end header
 #
+import pytest
 from linkahead import Record, RecordType, Property, Container, File, execute_query
 
 
 def assert_not_equal(a, b):
     assert a != b
 
+
 def assert_true(a):
     assert a
 
+
 def assert_is_not_none(a):
     assert a is not None
 
+
 def assert_equal(a, b):
     assert a == b
 
 
-import pytest
-
-
 def test_retrieve_shortcuts():
     c = Container().retrieve(
         [Record(1337), Record(1338)], raise_exception_on_error=False)
diff --git a/tests/test_name_properties.py b/tests/test_name_properties.py
index 3128c9d..b2fff37 100644
--- a/tests/test_name_properties.py
+++ b/tests/test_name_properties.py
@@ -29,12 +29,15 @@
 import linkahead as db
 from pytest import raises, mark
 
+
 def assert_true(a):
     assert a
 
+
 def assert_equal(a, b):
     assert a == b
 
+
 def setup_module():
     pass
 
diff --git a/tests/test_permissions.py b/tests/test_permissions.py
index da4a549..7fffb27 100644
--- a/tests/test_permissions.py
+++ b/tests/test_permissions.py
@@ -27,23 +27,26 @@
 """
 
 from __future__ import absolute_import
+from pytest import raises, mark
 
 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
-
 
 test_user = "test_user"
 test_role = "test_role"
diff --git a/tests/test_records.py b/tests/test_records.py
index 82cae22..a9a08a4 100644
--- a/tests/test_records.py
+++ b/tests/test_records.py
@@ -29,18 +29,23 @@ from linkahead import Record
 from linkahead.exceptions import CaosDBException
 import linkahead as caosdb
 
+
 def assert_is_not_none(a):
     assert a is not None
 
+
 def assert_equal(a, b):
     assert a == b
 
+
 def assert_true(a):
     assert a
 
+
 def assert_false(a):
     assert not a
 
+
 def teardown_function(function):
     try:
         caosdb.execute_query("FIND Test*").delete()
diff --git a/tests/test_recordtypes.py b/tests/test_recordtypes.py
index bc8150a..12ef99f 100644
--- a/tests/test_recordtypes.py
+++ b/tests/test_recordtypes.py
@@ -22,11 +22,11 @@
 # ** end header
 #
 
-import caosdb
+import linkahead as caosdb
 
 
 def test_recordtypes():
-    
+
     def assert_is_not_none(obj):
         assert obj is not None
 
@@ -108,7 +108,7 @@ def test_record_types_as_reference_properties():
 
     def assert_true(obj):
         assert obj is True
-    
+
     def assert_equal(obj1, obj2):
         assert obj1 == obj2
 
-- 
GitLab