腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(9999+)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
找不到
fixture
中最热的
fixture
基于此堆栈溢出:@pytest.
fixture
return { ... } def example_event'data': form_data, ... }我刚接触pytest,所以我甚至不确定这是否可能?
浏览 1
修改于2020-04-24
得票数 22
回答已采纳
1
回答
Fixture
.Customize对
Fixture
.Register
[Fact]{
fixture
.Customize<HttpClientc.Do(x => x.BaseAddress = new Uri("http://myval")); }); var client =
fixture
.CreateAssert.Equal("http:
浏览 3
修改于2022-09-28
得票数 4
回答已采纳
1
回答
pytest如何处理
fixture
调用其他
fixture
?
我有两个最常用的
fixture
,client和app。client调用app。@pytest.
fixture
app = create_app({ })
浏览 0
提问于2018-07-01
得票数 4
1
回答
Doctrine and
fixture
:在从
fixture
迁移时加载实体
我有一个网站,它成功地使用了Doctrine Migrations和
Fixture
(很棒的功能!),但是我有一个小问题。任何想法为什么会发生,或者关于我应该如何以不同的方式做这件事的建议。
fixture
实现了ContainerAwareInterface,这样我就可以访问实体存储库,但是: $repo = $this->container->get(&
浏览 2
修改于2012-11-13
得票数 3
回答已采纳
1
回答
Rails 5:如何将
fixture
指向其他
fixture
?
关联的
fixture
文件如下所示: # comments.yml author: users(:test_user)test_project: description: 'This is a test' owner: users(:test_user) 然而,我发现我的
fixture
浏览 32
提问于2019-02-22
得票数 1
回答已采纳
2
回答
Grails
fixture
plugin如何从内联插件加载
fixture
?
现在,当使用
Fixture
插件时,我们遇到了这样的问题:它想要从应用程序内部的某个位置读取
fixture
文件,而不是从共享的内联插件。所有的.load()方法都在应用程序内部查找
fixture
文件。有没有一种方法可以从应用程序内部的中心位置而不是
fixture
目录加载
fixture
文件?
浏览 1
提问于2011-12-07
得票数 1
回答已采纳
1
回答
Pytest -从另一个
fixture
调用
fixture
我有一个
fixture
,它返回某个类型的对象,我还有一个在另一个文件中定义的
fixture
,它基本上使用该对象来做其他事情。但是我无法从我的第一个
fixture
返回对象。file-1 def
fixture
_1(s, **kwargs): p_b = s.get() yield p return hook file-2 conftest.py @pytest.
fixture<
浏览 9
修改于2019-06-01
得票数 7
1
回答
标记Pytest
fixture
而不是使用
fixture
的所有测试
我可以禁用单个测试,但不能禁用用于多个测试的
fixture
。我的
fixture
代码如下所示:@pytest.mark.slow # get a postgres connection这个评论的原因是,
fixture
本质上是函数调用,而标记只能在编译时指定吗?有没有一种方法可以指定使用特定
fixture
(在本例中为postgres)的所有测试都可以标记为慢速,而无需在每个测试中指定@pytest.mark.slow?
浏览 8
修改于2021-04-04
得票数 3
3
回答
迁移Django
fixture
?
我有包含测试数据的.json
fixture
文件,其中的单元测试使用这些数据来确认应用程序是否正常工作。我还使用South迁移我的数据库。在进行了几次数据库迁移之后,我的
fixture
已经过时了,因为数据库已经迁移了,例如,添加了一个新的数据库列,而
fixture
数据没有该列,因为它是在数据库更改之前捕获的。在迁移数据库时,向前移动
fixture
的最佳方式是什么?
浏览 1
修改于2011-08-04
得票数 20
回答已采纳
1
回答
fixture
.debugElement.componentInstance和
fixture
.nativeElement有什么不同?
在这个示例测试文件中,我看到了两种不同的语法 一个是const app =
fixture
.debugElement.componentInstance;,另一个是const compiled =
fixture
.nativeElement= TestBed.createComponent(AppComponent); })); it(`should have as tit
浏览 21
提问于2019-06-07
得票数 9
回答已采纳
1
回答
Rake测试错误- ActiveRecord::
Fixture
::FormatError: ActiveRecord::
Fixture
::FormatError
8)错误: ProductTest#test_image_url: ActiveRecord::
Fixture
::FormatError: ActiveRecord::
Fixture
::FormatError::
Fixture
::FormatError 10)错误: ActiveRecord::
Fixture
::FormatError: ProductTest#test_product_is_not_valid_without_a_unique_titleActiveRecord::
Fixture
::Fo
浏览 1
修改于2014-07-24
得票数 2
1
回答
Scalatest访问
Fixture
属性
到目前为止,我的测试是如何格式化的 before("before
浏览 0
修改于2017-05-25
得票数 0
1
回答
调用其他
fixture
中的
fixture
,并在测试中使用第二个
fixture
我有这样的情况:import pytest def get_table_x(): return table_x def get_table_y['one', 'two', 'thre
浏览 9
提问于2021-10-14
得票数 0
2
回答
pytest
fixture
--获取值并避免出现错误"
Fixture
'X‘directly“
我已经将pytest更新到了4.3.0,现在我需要重新编写测试代码,因为直接调用
fixture
已被弃用。我有一个在unittest.TestCase中使用的
fixture
的问题,我如何获得从
fixture
返回的值,而不是对函数本身的引用?示例: @pytest.
fixture
return 1 class test_class
浏览 114
提问于2019-02-26
得票数 6
回答已采纳
1
回答
如何仅在
Fixture
级别执行'beforeEach‘,而不是针对
fixture
下每个测试
我只想在
fixture
级别运行'beforeEach‘,而不是针对该
fixture
下的每个测试运行
fixture
`
Fixture
A for Use Case1` --- await t });
fixture
`
Fixture
B for Use Case2
浏览 16
修改于2021-04-29
得票数 3
1
回答
如何测试pytest
fixture
本身?
请不要将其与在测试中使用
fixture
混淆。我只想自己测试
fixture
的正确性。 当我试图在测试中调用和执行它们时:
Fixture
"app" called directly.关于这个主题的文档没有给我提供有意义的指导:https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly 测试
fixture
本身的动机来自于我,因为当我们的测试由于
fixtur
浏览 194
修改于2019-06-17
得票数 10
回答已采纳
6
回答
如何创建
fixture
文件
我想在我的Django项目中创建一个
fixture
文件。 我该怎么做呢?
浏览 5
修改于2016-04-22
得票数 75
回答已采纳
1
回答
Pytest
fixture
相互干扰
我有两个用户
fixture
,一个是另一个的超集。在我使用同一个测试用例中的两个
fixture
之前,一切都按预期进行。灯具:def user_without_password():def user_with_password(user_without_password): user = user
浏览 1
提问于2017-04-05
得票数 2
2
回答
Django测试抱怨
Fixture
转储的数据python manage.py dumpdata --format json --indent 4 --exclude auth.permission --exclude contenttypes > app/fixtures/app_test_data.jsonIntegrityError: Problem installing fixtures: The row in table 'django_admin_log' with primary key '517'
浏览 2
提问于2013-10-17
得票数 11
2
回答
在Pytest中使用
fixture
我在conftest.py文件中有以下代码def app(request): return
fixture
def stop(request): print("\n AFTER SESSI
浏览 0
修改于2018-10-03
得票数 0
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券